[media] tw686x: Don't go past array
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sat, 23 Apr 2016 09:21:09 +0000 (06:21 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 25 Apr 2016 12:45:50 +0000 (09:45 -0300)
commit363d79f1d5bd09158cc28db543ca18549a5d7e52
tree24446e06f7dd775a6940d94d4a2b39820f122ba2
parent1a2b2c708c5f7187c4c33d002bed6130381a6698
[media] tw686x: Don't go past array

Depending on the compiler version, currently it produces the
following warnings:
tw686x-video.c: In function 'tw686x_video_init':
tw686x-video.c:65:543: warning: array subscript is above array bounds [-Warray-bounds]

This is actually bogus with the current code, as it currently
hardcodes the framerate to 30 frames/sec, however a potential
use after the array size could happen when the driver adds support
for setting the framerate. So, fix it.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/tw686x/tw686x-video.c