diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-03 13:00:25 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-03-02 12:53:46 -0500 |
commit | 8aa9eb9059f6246b530d664f271e5c32858222ed (patch) | |
tree | 271d75a4ee433c8506bcd3f21778d441f903680b /drivers/media/usb/au0828 | |
parent | 704b3f4c11e0b1265a41472b6b25dd9e3d205674 (diff) |
[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>
Diffstat (limited to 'drivers/media/usb/au0828')
-rw-r--r-- | drivers/media/usb/au0828/au0828-video.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index a27cb5fcdef8..b49fe9192559 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
@@ -899,12 +899,8 @@ void au0828_analog_unregister(struct au0828_dev *dev) | |||
899 | { | 899 | { |
900 | dprintk(1, "au0828_analog_unregister called\n"); | 900 | dprintk(1, "au0828_analog_unregister called\n"); |
901 | mutex_lock(&au0828_sysfs_lock); | 901 | mutex_lock(&au0828_sysfs_lock); |
902 | 902 | video_unregister_device(dev->vdev); | |
903 | if (dev->vdev) | 903 | video_unregister_device(dev->vbi_dev); |
904 | video_unregister_device(dev->vdev); | ||
905 | if (dev->vbi_dev) | ||
906 | video_unregister_device(dev->vbi_dev); | ||
907 | |||
908 | mutex_unlock(&au0828_sysfs_lock); | 904 | mutex_unlock(&au0828_sysfs_lock); |
909 | } | 905 | } |
910 | 906 | ||