diff mbox

mmotm 2010-10-13 - GSPCA SPCA561 webcam driver broken

Message ID 5158.1287086789@localhost (mailing list archive)
State Not Applicable
Headers show

Commit Message

Valdis Klētnieks Oct. 14, 2010, 8:06 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
index d4a3532..f069c61 100644
--- a/drivers/media/video/v4l2-dev.c
+++ b/drivers/media/video/v4l2-dev.c
@@ -221,8 +221,8 @@  static long v4l2_ioctl(struct file *filp, unsigned int cmd, 
        struct video_device *vdev = video_devdata(filp);
        int ret;
 
-       /* Allow ioctl to continue even if the device was unregistered.
-          Things like dequeueing buffers might still be useful. */
+       if (!vdev->fops->ioctl)
+               return -ENOTTY;
        if (vdev->fops->unlocked_ioctl) {
                ret = vdev->fops->unlocked_ioctl(filp, cmd, arg);
        } else if (vdev->fops->ioctl) {