summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-09-21 23:23:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 15:16:31 -0300
commit2a858486e0406110541e13f07d00665ee0c08a54 (patch)
tree77fbe44df50ca401f79e48eb42e4f6649cb404a8 /drivers/media/usb
parent132f56fb3c83c032cd75cd99c2967905e65f8684 (diff)
[media] dvb_usb_v2: fix error handling for .tuner_attach()
fe was not set NULL after it was destroyed in tuner attach fail error case. Due to that it was destroyed again and Kernel oopsed. Reported-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/dvb-usb-v2/dvb_usb_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index f9901593795..9859d2a2449 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -612,8 +612,10 @@ err_dvb_unregister_frontend:
err_dvb_frontend_detach:
for (i = MAX_NO_OF_FE_PER_ADAP - 1; i >= 0; i--) {
- if (adap->fe[i])
+ if (adap->fe[i]) {
dvb_frontend_detach(adap->fe[i]);
+ adap->fe[i] = NULL;
+ }
}
err: