]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
media: bttv: don't setup the controls if there are no video devices
authorHans Verkuil <hans.verkuil@cisco.com>
Mon, 11 Nov 2013 11:16:03 +0000 (08:16 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:45:10 +0000 (07:45 -0800)
commit899901b0776c94e91742f7f3e14ad39bc6e44411
tree6a840f95e448313fda260403f04e569f38f66757
parentec0593f929cd58143998f42263d74b10c203d393
media: bttv: don't setup the controls if there are no video devices

commit f8e1b699a5504a2da05834c7cfdddb125a8ce088 upstream.

The no_video flag was checked in all other cases except one. Calling
v4l2_ctrl_handler_setup() if no_video is 1 will crash.
This wasn't noticed before since there are only two card types that
set no_video to 1, so this type of hardware is quite rare.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Lorenz Röhrl <sheepshit@gmx.de>
Tested-by: Lorenz Röhrl <sheepshit@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/pci/bt8xx/bttv-driver.c