Skip to content

Commit

Permalink
V4L/DVB (7537): cx88/saa7134: Fix: avoid OOPS on module unload
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent fb7b37c commit 9950c1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,8 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
struct cx8802_dev *dev = drv->core->dvbdev;

/* dvb */
videobuf_dvb_unregister(&dev->dvb);
if (dev->dvb.frontend)
videobuf_dvb_unregister(&dev->dvb);

vp3054_i2c_remove(dev);

Expand Down
3 changes: 2 additions & 1 deletion drivers/media/video/saa7134/saa7134-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9950c1b

Please sign in to comment.