]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] dvb_usb_v2: fix error handling for .tuner_attach()
authorAntti Palosaari <crope@iki.fi>
Sat, 22 Sep 2012 02:23:49 +0000 (23:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Sep 2012 18:16:31 +0000 (15:16 -0300)
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>
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c

index f990159379571204f01dfbb9a840002ab8557c37..9859d2a2449b974bf162a32f78eeb8a543f9bf5f 100644 (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: