提交 019391e4 编写于 作者: S Steven Toth 提交者: Mauro Carvalho Chehab

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: NSteven Toth <stoth@hauppauge.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 3ac706d2
...@@ -662,7 +662,6 @@ int cx8802_register_driver(struct cx8802_driver *drv) ...@@ -662,7 +662,6 @@ int cx8802_register_driver(struct cx8802_driver *drv)
} }
list_for_each(list,&cx8802_devlist) { list_for_each(list,&cx8802_devlist) {
i++;
h = list_entry(list, struct cx8802_dev, devlist); h = list_entry(list, struct cx8802_dev, devlist);
printk(KERN_INFO "CORE %s: subsystem: %04x:%04x, board: %s [card=%d]\n", 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,6 +684,7 @@ int cx8802_register_driver(struct cx8802_driver *drv)
err = drv->probe(driver); err = drv->probe(driver);
if (err == 0) { if (err == 0) {
i++;
mutex_lock(&drv->core->lock); mutex_lock(&drv->core->lock);
list_add_tail(&driver->devlist,&h->drvlist.devlist); list_add_tail(&driver->devlist,&h->drvlist.devlist);
mutex_unlock(&drv->core->lock); mutex_unlock(&drv->core->lock);
...@@ -695,6 +695,8 @@ int cx8802_register_driver(struct cx8802_driver *drv) ...@@ -695,6 +695,8 @@ int cx8802_register_driver(struct cx8802_driver *drv)
} }
if (i == 0) if (i == 0)
err = -ENODEV; err = -ENODEV;
else
err = 0;
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册