mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
[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
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue