summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-input.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-20 09:26:36 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 13:31:52 -0200
commit83f56f7cbd070c0d9772221aa61198ef74c96cc4 (patch)
tree1c98474c7672437c189094872e248085cf842b9e /drivers/media/usb/em28xx/em28xx-input.c
parent332b295d107466df8b05a99a914adbe21401449b (diff)
downloadlinux-83f56f7cbd070c0d9772221aa61198ef74c96cc4.tar.gz
linux-83f56f7cbd070c0d9772221aa61198ef74c96cc4.tar.xz
[media] USB: Deletion of unnecessary checks before three function calls
GIT_AUTHOR_DATE=1416486805 The functions pvr2_hdw_destroy(), rc_unregister_device() and vfree() perform also input parameter validation. 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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-input.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index 23f8f6afa2e0..85ac7dd15700 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -841,8 +841,7 @@ static int em28xx_ir_fini(struct em28xx *dev)
if (!ir)
goto ref_put;
- if (ir->rc)
- rc_unregister_device(ir->rc);
+ rc_unregister_device(ir->rc);
kfree(ir->i2c_client);