mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 07:42:38 -04:00
[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:
committed by
Mauro Carvalho Chehab
parent
132f56fb3c
commit
2a858486e0
@@ -612,8 +612,10 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
|
||||
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user