diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 84424284d486..ccfed526518f 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -2332,7 +2332,6 @@ static void em28xx_free_v4l2(struct v4l2_device *v4l2_dev) struct em28xx *dev = v4l2->dev; v4l2_ctrl_handler_free(&v4l2->ctrl_handler); - v4l2_device_unregister(v4l2_dev); dev->v4l2 = NULL; kfree(v4l2); kref_put(&dev->ref, em28xx_free_device); @@ -2462,7 +2461,7 @@ static int em28xx_v4l2_fini(struct em28xx *dev) * The em28xx_free_v4l2() release callback will be invoked once all * userspace file handles to the video device nodes are closed. */ - v4l2_device_put(&v4l2->v4l2_dev); + v4l2_device_unregister(&v4l2->v4l2_dev); return 0; }