Commit 9950c1b5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

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: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent fb7b37cf
...@@ -951,7 +951,8 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv) ...@@ -951,7 +951,8 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
struct cx8802_dev *dev = drv->core->dvbdev; struct cx8802_dev *dev = drv->core->dvbdev;
/* dvb */ /* dvb */
videobuf_dvb_unregister(&dev->dvb); if (dev->dvb.frontend)
videobuf_dvb_unregister(&dev->dvb);
vp3054_i2c_remove(dev); vp3054_i2c_remove(dev);
......
...@@ -1302,7 +1302,8 @@ static int dvb_fini(struct saa7134_dev *dev) ...@@ -1302,7 +1302,8 @@ static int dvb_fini(struct saa7134_dev *dev)
} }
} }
} }
videobuf_dvb_unregister(&dev->dvb); if (dev->dvb.frontend)
videobuf_dvb_unregister(&dev->dvb);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment