diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 3d8e6d74e064..1fe1a833c7c7 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -662,7 +662,6 @@ int cx8802_register_driver(struct cx8802_driver *drv) | |||
662 | } | 662 | } |
663 | 663 | ||
664 | list_for_each(list,&cx8802_devlist) { | 664 | list_for_each(list,&cx8802_devlist) { |
665 | i++; | ||
666 | h = list_entry(list, struct cx8802_dev, devlist); | 665 | h = list_entry(list, struct cx8802_dev, devlist); |
667 | 666 | ||
668 | printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n", | 667 | printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n", |
@@ -685,6 +684,7 @@ int cx8802_register_driver(struct cx8802_driver *drv) | |||
685 | 684 | ||
686 | err = drv->probe(driver); | 685 | err = drv->probe(driver); |
687 | if (err == 0) { | 686 | if (err == 0) { |
687 | i++; | ||
688 | mutex_lock(&drv->core->lock); | 688 | mutex_lock(&drv->core->lock); |
689 | list_add_tail(&driver->devlist,&h->drvlist.devlist); | 689 | list_add_tail(&driver->devlist,&h->drvlist.devlist); |
690 | mutex_unlock(&drv->core->lock); | 690 | mutex_unlock(&drv->core->lock); |
@@ -695,6 +695,8 @@ int cx8802_register_driver(struct cx8802_driver *drv) | |||
695 | } | 695 | } |
696 | if (i == 0) | 696 | if (i == 0) |
697 | err = -ENODEV; | 697 | err = -ENODEV; |
698 | else | ||
699 | err = 0; | ||
698 | 700 | ||
699 | return err; | 701 | return err; |
700 | } | 702 | } |