Skip to content

Commit

Permalink
[media] DVB: Delete an unnecessary check before the function call "dv…
Browse files Browse the repository at this point in the history
…b_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>
  • Loading branch information
Markus Elfring authored and Mauro Carvalho Chehab committed Apr 8, 2015
1 parent e68c2fe commit 07d0e55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/dvb-core/dvb_ca_en50221.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 07d0e55

Please sign in to comment.