V4L/DVB (7100): frontends/tda18271-common.c: fix off-by-one
authorAdrian Bunk <bunk@kernel.org>
Tue, 29 Jan 2008 01:12:41 +0000 (22:12 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:15:02 +0000 (11:15 -0300)
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>
drivers/media/dvb/frontends/tda18271-common.c

index cebb6b90b7e0dc267c198abc1274300db1e2ab56..bca57099061366badc9cc4fec3dc8dde982ca02f 100644 (file)
@@ -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) &&