diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2012-05-21 17:28:14 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 20:59:16 +0200 |
commit | bffaecc75cc6cbbf1e46571256d7b137df61bff6 (patch) | |
tree | ee1562308a4433db5f35fe3bbbfe03a599f11be9 /drivers/media/dvb/frontends | |
parent | [media] V4L2 spec fix (diff) | |
download | linux-bffaecc75cc6cbbf1e46571256d7b137df61bff6.tar.xz linux-bffaecc75cc6cbbf1e46571256d7b137df61bff6.zip |
[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>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r-- | drivers/media/dvb/frontends/lg2160.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/lg2160.c b/drivers/media/dvb/frontends/lg2160.c index a3ab1a5b6597..cc11260e99df 100644 --- a/drivers/media/dvb/frontends/lg2160.c +++ b/drivers/media/dvb/frontends/lg2160.c @@ -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; |