From: Antti Palosaari Date: Sat, 22 Sep 2012 02:23:49 +0000 (-0300) Subject: [media] dvb_usb_v2: fix error handling for .tuner_attach() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2a858486e0406110541e13f07d00665ee0c08a54;p=openwrt%2Fstaging%2Fblogic.git [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 --- 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: