From: Mariusz Kozlowski Date: Sat, 26 Mar 2011 18:23:56 +0000 (-0300) Subject: [media] dib0700: fix possible NULL pointer dereference X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd206508492caffaccc36cbfc40d3b1f8eeb1f0b;p=linux-beck.git [media] dib0700: fix possible NULL pointer dereference Seems like 'adap->fe' test for NULL was meant to be before we dereference that pointer. Signed-off-by: Mariusz Kozlowski Acked-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 65214af5cd74..5c01d25875ed 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -2439,7 +2439,6 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap) dib0700_set_i2c_speed(adap->dev, 340); adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]); - if (adap->fe == NULL) return -ENODEV;