summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-10-06 20:29:25 -0400
committerSteven Toth <stoth@hauppauge.com>2006-10-06 20:29:25 -0400
commit2e5aadf663db9a0ec727cf0ff3429f299fe7cc14 (patch)
tree5780614350e1bb05a02d8e89b3686d5826b4a248 /linux/drivers/media/video/cx88/cx88-mpeg.c
parent27f1ca00af6b61fcb546e54ce0b2b6ad3322031f (diff)
downloadmediapointer-dvb-s2-2e5aadf663db9a0ec727cf0ff3429f299fe7cc14.tar.gz
mediapointer-dvb-s2-2e5aadf663db9a0ec727cf0ff3429f299fe7cc14.tar.bz2
cx88-blackbird module is rejected during probe.
From: Steven Toth <stoth@hauppauge.com> 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>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index e36a9dccf..0859f7e32 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -701,7 +701,6 @@ int cx8802_register_driver(struct cx8802_driver *drv)
}
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",
@@ -724,6 +723,7 @@ int cx8802_register_driver(struct cx8802_driver *drv)
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);
@@ -734,6 +734,8 @@ int cx8802_register_driver(struct cx8802_driver *drv)
}
if (i == 0)
err = -ENODEV;
+ else
+ err = 0;
return err;
}