[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>
This commit is contained in:
Antti Palosaari 2012-09-21 23:23:49 -03:00 committed by Mauro Carvalho Chehab
parent 132f56fb3c
commit 2a858486e0

View File

@ -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: