From: Markus Elfring <elfr...@users.sourceforge.net>
Date: Tue, 3 Feb 2015 19:00:25 +0100

The video_unregister_device() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net>
---
 drivers/media/usb/au0828/au0828-video.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c 
b/drivers/media/usb/au0828/au0828-video.c
index 5f337b1..e593fb5 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -870,12 +870,8 @@ void au0828_analog_unregister(struct au0828_dev *dev)
 {
        dprintk(1, "au0828_release_resources called\n");
        mutex_lock(&au0828_sysfs_lock);
-
-       if (dev->vdev)
-               video_unregister_device(dev->vdev);
-       if (dev->vbi_dev)
-               video_unregister_device(dev->vbi_dev);
-
+       video_unregister_device(dev->vdev);
+       video_unregister_device(dev->vbi_dev);
        mutex_unlock(&au0828_sysfs_lock);
 }
 
-- 
2.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to