V4L/DVB (4743): Fix oops in VIDIOC_G_PARM
authorJonathan Corbet <corbet-v4l@lwn.net>
Fri, 13 Oct 2006 10:51:16 +0000 (07:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 14 Oct 2006 03:44:20 +0000 (00:44 -0300)
commit83427ac5d643308ccb36e05d525949952bdedc27
treece2e0b87884e4ed97bf25ea1a43b1c5ea79daa26
parentc12e3be0860652ed1e15c9442adcba44317211d1
V4L/DVB (4743): Fix oops in VIDIOC_G_PARM

The call to v4l2_std_construct() in the VIDIOC_G_PARM handler treats
vfd->current_norm as if it were an index - but it's not.  The result is
an oops if the driver has no vidioc_g_parm() method defined.  Here's the
fix.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/videodev.c