Skip to content

Commit

Permalink
[media] saa7134: use correct array offset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent 938ca36 commit e82db75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/saa7134/saa7134-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e82db75

Please sign in to comment.