aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-12-17 12:26:29 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:57 -0500
commit9e7e85ebaeba22979209268423f5aae8a352df4c (patch)
tree2ce1d5d79c6f8865d67ea81a4b003d59c1d47528 /drivers/media/video/bt8xx/bttv-driver.c
parent71021d2601c54eee6df3afaf79aed430b17e1366 (diff)
V4L/DVB (6848): bttv: check pci_register_driver() error
Check pci_register_driver() error in module_init. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c7
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 eb2c12eb2fc8..e04113f0b7e2 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)
4404 printk(KERN_WARNING "bttv: bus_register error: %d\n", ret); 4404 printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
4405 return ret; 4405 return ret;
4406 } 4406 }
4407 return pci_register_driver(&bttv_pci_driver); 4407 ret = pci_register_driver(&bttv_pci_driver);
4408 if (ret < 0)
4409 bus_unregister(&bttv_sub_bus_type);
4410
4411 return ret;
4408} 4412}
4409 4413
4410static void __exit bttv_cleanup_module(void) 4414static void __exit bttv_cleanup_module(void)
4411{ 4415{
4412 pci_unregister_driver(&bttv_pci_driver); 4416 pci_unregister_driver(&bttv_pci_driver);
4413 bus_unregister(&bttv_sub_bus_type); 4417 bus_unregister(&bttv_sub_bus_type);
4414 return;
4415} 4418}
4416 4419
4417module_init(bttv_init_module); 4420module_init(bttv_init_module);