mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
media: tm6000: add error handling for dvb_register_adapter
When dvb_register_adapter fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling dvb_register_adapter. Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com> [hans.verkuil@cisco.com: use pr_err and fix typo: adater -> adapter] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
6c8871baeb
commit
e95d7c6eb9
1 changed files with 5 additions and 0 deletions
|
|
@ -266,6 +266,11 @@ static int register_dvb(struct tm6000_core *dev)
|
|||
|
||||
ret = dvb_register_adapter(&dvb->adapter, "Trident TVMaster 6000 DVB-T",
|
||||
THIS_MODULE, &dev->udev->dev, adapter_nr);
|
||||
if (ret < 0) {
|
||||
pr_err("tm6000: couldn't register the adapter!\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
dvb->adapter.priv = dev;
|
||||
|
||||
if (dvb->frontend) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue