mirror of https://gitee.com/openkylin/linux.git
[media] lg2160: fix off-by-one error in lg216x_write_regs
Fix an off-by-one error in lg216x_write_regs, causing the last element of the lg216x init block to be ignored. Spotted by Dan Carpenter. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
87736df240
commit
bffaecc75c
|
@ -126,7 +126,7 @@ static int lg216x_write_regs(struct lg216x_state *state,
|
|||
|
||||
lg_reg("writing %d registers...\n", len);
|
||||
|
||||
for (i = 0; i < len - 1; i++) {
|
||||
for (i = 0; i < len; i++) {
|
||||
ret = lg216x_write_reg(state, regs[i].reg, regs[i].val);
|
||||
if (lg_fail(ret))
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue