Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] ddbridge: remove unneeded check before 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>

authored by

Markus Elfring and committed by
Mauro Carvalho Chehab
ddc0085e e358c8a6

+1 -2
+1 -2
drivers/media/pci/ddbridge/ddbridge-core.c
··· 1118 1118 dvb_input_detach(port->input[1]); 1119 1119 break; 1120 1120 case DDB_PORT_CI: 1121 - if (port->output->dev) 1122 - dvb_unregister_device(port->output->dev); 1121 + dvb_unregister_device(port->output->dev); 1123 1122 if (port->en) { 1124 1123 ddb_input_stop(port->input[0]); 1125 1124 ddb_output_stop(port->output);