Skip to content

Commit

Permalink
[media] ddbridge: remove unneeded check before dvb_unregister_device()
Browse files Browse the repository at this point in the history
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 Dec 4, 2014
1 parent e358c8a commit ddc0085
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/pci/ddbridge/ddbridge-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,7 @@ static void ddb_ports_detach(struct ddb *dev)
dvb_input_detach(port->input[1]);
break;
case DDB_PORT_CI:
if (port->output->dev)
dvb_unregister_device(port->output->dev);
dvb_unregister_device(port->output->dev);
if (port->en) {
ddb_input_stop(port->input[0]);
ddb_output_stop(port->output);
Expand Down

0 comments on commit ddc0085

Please sign in to comment.