瀏覽代碼

[media] au0828: Delete unnecessary checks before the function call "video_unregister_device"

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 <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Markus Elfring 10 年之前
父節點
當前提交
8aa9eb9059
共有 1 個文件被更改,包括 2 次插入6 次删除
  1. 2 6
      drivers/media/usb/au0828/au0828-video.c

+ 2 - 6
drivers/media/usb/au0828/au0828-video.c

@@ -899,12 +899,8 @@ void au0828_analog_unregister(struct au0828_dev *dev)
 {
 	dprintk(1, "au0828_analog_unregister 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);
 }