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

[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>

+2
+2
drivers/media/usb/siano/smsusb.c
··· 440 440 if (rc < 0) { 441 441 pr_err("smscore_register_device(...) failed, rc %d\n", rc); 442 442 smsusb_term_device(intf); 443 + #ifdef CONFIG_MEDIA_CONTROLLER_DVB 443 444 media_device_unregister(mdev); 445 + #endif 444 446 kfree(mdev); 445 447 return rc; 446 448 }