提交 9e7e85eb 编写于 作者: A Akinobu Mita 提交者: Mauro Carvalho Chehab

V4L/DVB (6848): bttv: check pci_register_driver() error

Check pci_register_driver() error in module_init.
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 71021d26
......@@ -4404,14 +4404,17 @@ static int __init bttv_init_module(void)
printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
return ret;
}
return pci_register_driver(&bttv_pci_driver);
ret = pci_register_driver(&bttv_pci_driver);
if (ret < 0)
bus_unregister(&bttv_sub_bus_type);
return ret;
}
static void __exit bttv_cleanup_module(void)
{
pci_unregister_driver(&bttv_pci_driver);
bus_unregister(&bttv_sub_bus_type);
return;
}
module_init(bttv_init_module);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册