Re: [patch, -git] drivers/media build fix for modular builds

Mauro Carvalho Chehab
2008-04-30T16:14:24Z

On Wed, 30 Apr 2008 17:48:10 +0200
Mike Galbraith <efault@gmx.de> wrote:

>
> On Wed, 2008-04-30 at 12:25 -0300, Mauro Carvalho Chehab wrote:
>
> > Please try this patch. It should avoid an OOPS, if attach fails.
>
> Different oops.
>

Detach order were wrong.

Try this, please.

diff -r d05d249a98a7 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Wed Apr 30 12:45:00 2008 -0300
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Wed Apr 30 13:09:51 2008 -0300
@@ -516,8 +516,8 @@
if (!fe) {
printk(KERN_ERR "%s/2: xc3028 attach failed\n",
dev->core->name);
+ dvb_unregister_frontend(dev->dvb.frontend);
dvb_frontend_detach(dev->dvb.frontend);
- dvb_unregister_frontend(dev->dvb.frontend);
dev->dvb.frontend = NULL;
return -EINVAL;
}
diff -r d05d249a98a7 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Wed Apr 30 12:45:00 2008 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Wed Apr 30 13:09:51 2008 -0300
@@ -1345,8 +1345,8 @@
return ret;

dettach_frontend:
+ dvb_unregister_frontend(dev->dvb.frontend);
dvb_frontend_detach(dev->dvb.frontend);
- dvb_unregister_frontend(dev->dvb.frontend);
dev->dvb.frontend = NULL;

return -1;

Cheers,
Mauro