提交 8aa9eb90 编写于 作者: M Markus Elfring 提交者: Mauro Carvalho Chehab

[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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 704b3f4c
...@@ -899,12 +899,8 @@ void au0828_analog_unregister(struct au0828_dev *dev) ...@@ -899,12 +899,8 @@ void au0828_analog_unregister(struct au0828_dev *dev)
{ {
dprintk(1, "au0828_analog_unregister called\n"); dprintk(1, "au0828_analog_unregister called\n");
mutex_lock(&au0828_sysfs_lock); mutex_lock(&au0828_sysfs_lock);
video_unregister_device(dev->vdev);
if (dev->vdev) video_unregister_device(dev->vbi_dev);
video_unregister_device(dev->vdev);
if (dev->vbi_dev)
video_unregister_device(dev->vbi_dev);
mutex_unlock(&au0828_sysfs_lock); mutex_unlock(&au0828_sysfs_lock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册