From 2a858486e0406110541e13f07d00665ee0c08a54 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Fri, 21 Sep 2012 23:23:49 -0300 Subject: [PATCH] [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 Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f99015937957..9859d2a2449b 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: -- 2.39.5