Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9e7e85ebaeba22979209268423f5aae8a352df4c Commit: 9e7e85ebaeba22979209268423f5aae8a352df4c Parent: 71021d2601c54eee6df3afaf79aed430b17e1366 Author: Akinobu Mita <[EMAIL PROTECTED]> AuthorDate: Mon Dec 17 14:26:29 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Fri Jan 25 19:03:57 2008 -0200
V4L/DVB (6848): bttv: check pci_register_driver() error Check pci_register_driver() error in module_init. Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/bt8xx/bttv-driver.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index eb2c12e..e04113f 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -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); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html