summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-08-08 22:48:11 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 18:53:48 +0400
commit4e66c97c9299d53f1d9167e42b05357f023099c8 (patch)
tree43e0ad4156bfe890a59b0bb2c54d8cec5ad886d8 /drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
parenta2c00a0eee751e298c916508b6fa5cee0d7d188d (diff)
downloadlinux-4e66c97c9299d53f1d9167e42b05357f023099c8.tar.xz
V4L/DVB: DiB3000MC: set FE to NULL after being freed
DiB3000MC: set FE to NULL after being freed Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-dvb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-dvb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 3a19689d9c9a..fe6208ada903 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -175,7 +175,7 @@ static int dvb_usb_fe_sleep(struct dvb_frontend *fe)
int dvb_usb_fe_init(struct dvb_usb_device* d)
{
if (d->props.frontend_attach == NULL) {
- err("strange '%s' doesn't want to attach a frontend.",d->desc->name);
+ err("strange: '%s' doesn't want to attach a frontend.",d->desc->name);
return 0;
}
@@ -186,8 +186,7 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
if (dvb_register_frontend(&d->dvb_adap, d->fe)) {
err("Frontend registration failed.");
- if (d->fe->ops.release)
- d->fe->ops.release(d->fe);
+ dvb_frontend_detach(d->fe);
d->fe = NULL;
return -ENODEV;
}
@@ -203,7 +202,9 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
int dvb_usb_fe_exit(struct dvb_usb_device *d)
{
- if (d->fe != NULL)
+ if (d->fe != NULL) {
dvb_unregister_frontend(d->fe);
+ dvb_frontend_detach(d->fe);
+ }
return 0;
}