OSDN Git Service

media: omap3isp: Call video_unregister_device() unconditionally
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 20 Feb 2017 15:22:18 +0000 (10:22 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 29 May 2019 20:39:52 +0000 (16:39 -0400)
video_unregister_device() can be called on a never or an already
unregistered device. Drop the redundant check.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/omap3isp/ispvideo.c

index 078d641..175bbed 100644 (file)
@@ -1495,6 +1495,5 @@ int omap3isp_video_register(struct isp_video *video, struct v4l2_device *vdev)
 
 void omap3isp_video_unregister(struct isp_video *video)
 {
-       if (video_is_registered(&video->video))
-               video_unregister_device(&video->video);
+       video_unregister_device(&video->video);
 }