[media] saa7134: use correct array offset
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 5 Jan 2012 05:24:00 +0000 (02:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jan 2012 19:19:46 +0000 (17:19 -0200)
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7134/saa7134-tvaudio.c

index ec1df6f6f43066969c58e6bb044adb2fb7e134bd..b7a99bee2f98b404abbb398e3db48131ca132b64 100644 (file)
@@ -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;