summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-core/dvb_ca_en50221.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-02-03 12:01:40 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-08 07:40:53 -0300
commit07d0e554b5d10522b4cd6448108c0ad16403fea6 (patch)
treeb42426e7f5cd7f5ed39674743f812fdf8413a11d /drivers/media/dvb-core/dvb_ca_en50221.c
parente68c2fe64c52c33e55f2d259d41a956a9e1f2a83 (diff)
downloadlwn-07d0e554b5d10522b4cd6448108c0ad16403fea6.tar.gz
lwn-07d0e554b5d10522b4cd6448108c0ad16403fea6.zip
[media] DVB: Delete an unnecessary check before the function call "dvb_unregister_device"
The dvb_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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-core/dvb_ca_en50221.c')
-rw-r--r--drivers/media/dvb-core/dvb_ca_en50221.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
index 55a217f0ad0e..7a9dd25a4cce 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
@@ -1728,8 +1728,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter,
error:
if (ca != NULL) {
- if (ca->dvbdev != NULL)
- dvb_unregister_device(ca->dvbdev);
+ dvb_unregister_device(ca->dvbdev);
kfree(ca->slot_info);
kfree(ca);
}