diff options
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 9 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dib3000mc.c | 5 |
2 files changed, 8 insertions, 6 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) | |||
175 | int dvb_usb_fe_init(struct dvb_usb_device* d) | 175 | int dvb_usb_fe_init(struct dvb_usb_device* d) |
176 | { | 176 | { |
177 | if (d->props.frontend_attach == NULL) { | 177 | if (d->props.frontend_attach == NULL) { |
178 | err("strange '%s' doesn't want to attach a frontend.",d->desc->name); | 178 | err("strange: '%s' doesn't want to attach a frontend.",d->desc->name); |
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
@@ -186,8 +186,7 @@ int dvb_usb_fe_init(struct dvb_usb_device* d) | |||
186 | 186 | ||
187 | if (dvb_register_frontend(&d->dvb_adap, d->fe)) { | 187 | if (dvb_register_frontend(&d->dvb_adap, d->fe)) { |
188 | err("Frontend registration failed."); | 188 | err("Frontend registration failed."); |
189 | if (d->fe->ops.release) | 189 | dvb_frontend_detach(d->fe); |
190 | d->fe->ops.release(d->fe); | ||
191 | d->fe = NULL; | 190 | d->fe = NULL; |
192 | return -ENODEV; | 191 | return -ENODEV; |
193 | } | 192 | } |
@@ -203,7 +202,9 @@ int dvb_usb_fe_init(struct dvb_usb_device* d) | |||
203 | 202 | ||
204 | int dvb_usb_fe_exit(struct dvb_usb_device *d) | 203 | int dvb_usb_fe_exit(struct dvb_usb_device *d) |
205 | { | 204 | { |
206 | if (d->fe != NULL) | 205 | if (d->fe != NULL) { |
207 | dvb_unregister_frontend(d->fe); | 206 | dvb_unregister_frontend(d->fe); |
207 | dvb_frontend_detach(d->fe); | ||
208 | } | ||
208 | return 0; | 209 | return 0; |
209 | } | 210 | } |
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index cc41c6bcdaf6..04ce6276f873 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -899,9 +899,10 @@ int dib3000mc_attach(struct i2c_adapter *i2c_adap, int no_of_demods, u8 default_ | |||
899 | return 0; | 899 | return 0; |
900 | 900 | ||
901 | error: | 901 | error: |
902 | for (k = 0; k < num; k++) | 902 | for (k = 0; k < num; k++) { |
903 | kfree(demod[k]->demodulator_priv); | 903 | kfree(demod[k]->demodulator_priv); |
904 | 904 | demod[k] = NULL; | |
905 | } | ||
905 | return -EINVAL; | 906 | return -EINVAL; |
906 | } | 907 | } |
907 | 908 | ||