diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-11-11 06:16:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-11-29 11:18:33 -0500 |
commit | f8e1b699a5504a2da05834c7cfdddb125a8ce088 (patch) | |
tree | 65fcd049b419d75c6bb7bc1d9238180f33ff2fac /drivers/media/pci | |
parent | 0c413d10515feae02cee967b31bb8afea8aa0d29 (diff) |
[media] bttv: don't setup the controls if there are no video devices
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>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index a3b1ee9c00d7..92a06fd85865 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -4182,7 +4182,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id) | |||
4182 | } | 4182 | } |
4183 | btv->std = V4L2_STD_PAL; | 4183 | btv->std = V4L2_STD_PAL; |
4184 | init_irqreg(btv); | 4184 | init_irqreg(btv); |
4185 | v4l2_ctrl_handler_setup(hdl); | 4185 | if (!bttv_tvcards[btv->c.type].no_video) |
4186 | v4l2_ctrl_handler_setup(hdl); | ||
4186 | if (hdl->error) { | 4187 | if (hdl->error) { |
4187 | result = hdl->error; | 4188 | result = hdl->error; |
4188 | goto fail2; | 4189 | goto fail2; |