[media] firewire: Deletion of an unnecessary check before the function call "dvb_unre...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 20 Nov 2014 09:49:07 +0000 (06:49 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 25 Nov 2014 15:30:31 +0000 (13:30 -0200)
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>
Reviewed-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/firewire/firedtv-ci.c

index e5ebdbfe8c19e45c9f12b98639b44860d6a8b83e..e63f582378bfff5193078f5bcdc6fe15713b8247 100644 (file)
@@ -253,6 +253,5 @@ int fdtv_ca_register(struct firedtv *fdtv)
 
 void fdtv_ca_release(struct firedtv *fdtv)
 {
-       if (fdtv->cadev)
-               dvb_unregister_device(fdtv->cadev);
+       dvb_unregister_device(fdtv->cadev);
 }