Skip to content

Commit

Permalink
V4L/DVB (7100): frontends/tda18271-common.c: fix off-by-one
Browse files Browse the repository at this point in the history
This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Adrian Bunk authored and Mauro Carvalho Chehab committed Feb 18, 2008
1 parent 0e8f4cc commit 805d92d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/tda18271-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int tda18271_read_extended(struct dvb_frontend *fe)
if (ret != 2)
tda_err("ERROR: i2c_transfer returned: %d\n", ret);

for (i = 0; i <= TDA18271_NUM_REGS; i++) {
for (i = 0; i < TDA18271_NUM_REGS; i++) {
/* don't update write-only registers */
if ((i != R_EB9) &&
(i != R_EB16) &&
Expand Down

0 comments on commit 805d92d

Please sign in to comment.