diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-20 15:26:36 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-25 18:31:52 +0300 |
commit | 83f56f7cbd070c0d9772221aa61198ef74c96cc4 (patch) | |
tree | 1c98474c7672437c189094872e248085cf842b9e /drivers/media/usb/pvrusb2 | |
parent | 332b295d107466df8b05a99a914adbe21401449b (diff) | |
download | 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/pvrusb2')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-context.c b/drivers/media/usb/pvrusb2/pvrusb2-context.c index 7c19ff72e6b3..c8761c71c9d2 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-context.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-context.c @@ -80,7 +80,7 @@ static void pvr2_context_set_notify(struct pvr2_context *mp, int fl) static void pvr2_context_destroy(struct pvr2_context *mp) { pvr2_trace(PVR2_TRACE_CTXT,"pvr2_context %p (destroy)",mp); - if (mp->hdw) pvr2_hdw_destroy(mp->hdw); + pvr2_hdw_destroy(mp->hdw); pvr2_context_set_notify(mp, 0); mutex_lock(&pvr2_context_mutex); if (mp->exist_next) { |