--- x/drivers/media/usb/em28xx/em28xx-video.c +++ y/drivers/media/usb/em28xx/em28xx-video.c @@ -2152,6 +2152,10 @@ static int em28xx_v4l2_open(struct file if (mutex_lock_interruptible(&dev->lock)) return -ERESTARTSYS; + if (!dev->v4l2) { + mutex_unlock(&dev->lock); + return -ENODEV; + } ret = v4l2_fh_open(filp); if (ret) { dev_err(&dev->intf->dev, @@ -2161,6 +2165,7 @@ static int em28xx_v4l2_open(struct file return ret; } + v4l2 = dev->v4l2; if (v4l2->users == 0) { em28xx_set_mode(dev, EM28XX_ANALOG_MODE);