If the last cx88 board probed is not backbird based, and a previous board was,
the entire module is unloaded leading to an oops during mpeg_open on the
first /dev/videoN device.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
        }
 
        list_for_each(list,&cx8802_devlist) {
-               i++;
                h = list_entry(list, struct cx8802_dev, devlist);
 
                printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n",
 
                err = drv->probe(driver);
                if (err == 0) {
+                       i++;
                        mutex_lock(&drv->core->lock);
                        list_add_tail(&driver->devlist,&h->drvlist.devlist);
                        mutex_unlock(&drv->core->lock);
        }
        if (i == 0)
                err = -ENODEV;
+       else
+               err = 0;
 
        return err;
 }