Skip to contentSkip to conversation

video/bt8xx/bttv-cards.c: fix off-by-one errors

PATCH New Adrian Bunk 1 participant 1 message Apr 4, 2006 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video/bt8xx/bttv-cards.c: fix off-by-one errors

This patch fixes two off-by-one errors spotted by the Coverity checker.

---

 drivers/media/video/bt8xx/bttv-cards.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/video/bt8xx/bttv-cards.c renamed from drivers/media/video/bt8xx/bttv-cards.c.old +2 -2
@@ -2991,13 +2991,13 @@ void __devinit bttv_idcard(struct bttv *
 
 	if (UNSET != audiomux[0]) {
 		gpiobits = 0;
-		for (i = 0; i < 5; i++) {
+		for (i = 0; i < 4; i++) {
 			bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
 			gpiobits |= audiomux[i];
 		}
 	} else {
 		gpiobits = audioall;
-		for (i = 0; i < 5; i++) {
+		for (i = 0; i < 4; i++) {
 			bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
 		}
 	}