V4L/DVB (7537): cx88/saa7134: Fix: avoid OOPS on module unload

If frontend is not attached, both cx88-dvb and saa7134-dvb don't
register DVB. However, dvb unregister were inconditionally called.

Due to that, an OOPS is generated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Mauro Carvalho Chehab 2008-04-11 11:29:44 -03:00
parent fb7b37cf91
commit 9950c1b5b4
2 changed files with 4 additions and 2 deletions

View file

@ -951,6 +951,7 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
struct cx8802_dev *dev = drv->core->dvbdev;
/* dvb */
if (dev->dvb.frontend)
videobuf_dvb_unregister(&dev->dvb);
vp3054_i2c_remove(dev);

View file

@ -1302,6 +1302,7 @@ static int dvb_fini(struct saa7134_dev *dev)
}
}
}
if (dev->dvb.frontend)
videobuf_dvb_unregister(&dev->dvb);
return 0;
}