summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-10-07 02:29:25 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 11:50:50 +0100
commit019391e426266a346ac2f1b3d3c70c26b482ff31 (patch)
treeff4ce2f08e6a26cd86a8356f7b94aee848cd82f8 /drivers/media/video/cx88
parentV4L/DVB (4728): Add support for AverMedia AverTV Studio 507 (diff)
downloadlinux-019391e426266a346ac2f1b3d3c70c26b482ff31.tar.xz
linux-019391e426266a346ac2f1b3d3c70c26b482ff31.zip
V4L/DVB (4736): Cx88-blackbird module is rejected during probe.
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>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c4
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)
}
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",
@@ -685,6 +684,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);
@@ -695,6 +695,8 @@ int cx8802_register_driver(struct cx8802_driver *drv)
}
if (i == 0)
err = -ENODEV;
+ else
+ err = 0;
return err;
}