diff options
Diffstat (limited to 'linux/drivers/media/video/bt8xx')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 7c819c5b9..93d4e1688 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -3942,6 +3942,8 @@ static void bttv_unregister_video(struct bttv *btv) /* register video4linux devices */ static int __devinit bttv_register_video(struct bttv *btv) { + int ret; + if (no_overlay <= 0) { bttv_video_template.type |= VID_TYPE_OVERLAY; } else { @@ -3957,7 +3959,10 @@ static int __devinit bttv_register_video(struct bttv *btv) printk(KERN_INFO "bttv%d: registered device video%d\n", btv->c.nr,btv->video_dev->minor & 0x1f); #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) - video_device_create_file(btv->video_dev, &class_device_attr_card); + ret = video_device_create_file(btv->video_dev, &class_device_attr_card); + if (ret < 0) + printk(KERN_WARNING "bttv: video_device_create_file error: " + "%d\n", ret); #endif /* vbi */ @@ -4340,6 +4345,8 @@ static struct pci_driver bttv_pci_driver = { static int bttv_init_module(void) { + int ret; + bttv_num = 0; printk(KERN_INFO "bttv: driver version %d.%d.%d loaded\n", @@ -4362,7 +4369,11 @@ static int bttv_init_module(void) bttv_check_chipset(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - bus_register(&bttv_sub_bus_type); + ret = bus_register(&bttv_sub_bus_type); + if (ret < 0) { + printk(KERN_WARNING "bttv: bus_register error: %d\n", ret); + return ret; + } #endif return pci_register_driver(&bttv_pci_driver); } |