Skip to contentSkip to conversation

saa7134: use correct array offset

PATCH New Dan Carpenter 1 participant 1 message Jan 5, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 saa7134: use correct array offset

Smatch complains that i can be one passed the end of the array if we don't hit the break statement. We should be using the "audio" here like we do in the other places.

---
Compile tested only. Please review carefully.

drivers/media/video/saa7134/saa7134-tvaudio.c +1 -1
index ec1df6f..b7a99be 100644
@@ -605,7 +605,7 @@ static int tvaudio_thread(void *data)
 			if (kthread_should_stop())
 				break;
 			if (UNSET = dev->thread.mode) {
-				rx = tvaudio_getstereo(dev,&tvaudio[i]);
+				rx = tvaudio_getstereo(dev, &tvaudio[audio]);
 				mode = saa7134_tvaudio_rx2mode(rx);
 			} else {
 				mode = dev->thread.mode;