summaryrefslogtreecommitdiff
path: root/drivers/media/usb/siano
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-02 20:17:01 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-02 20:17:01 +0300
commitf704eab5b6beff878fc68dca800a4979ec97a15c (patch)
tree2f15164d0cef0f7140e9addd4bd4ee651dfa696f /drivers/media/usb/siano
parent89a2c1d60aa2cfcf4c9f194b4c923d72182be431 (diff)
downloadlinux-f704eab5b6beff878fc68dca800a4979ec97a15c.tar.xz
[media] siano: avoid a linkedit error if !MC
If the media controller (MC) is not enabled, it will compile fine, but will fail at the linkedition: ERROR: "media_device_unregister" [drivers/media/usb/siano/smsusb.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/siano')
-rw-r--r--drivers/media/usb/siano/smsusb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index 0b13ad3d3a8c..c945e4c2fbd4 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -440,7 +440,9 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
if (rc < 0) {
pr_err("smscore_register_device(...) failed, rc %d\n", rc);
smsusb_term_device(intf);
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
media_device_unregister(mdev);
+#endif
kfree(mdev);
return rc;
}