* [PATCH] [media] dib0700: fix possible NULL pointer dereference
@ 2011-03-26 18:23 Mariusz Kozlowski
2011-04-03 15:44 ` Patrick Boettcher
0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Kozlowski @ 2011-03-26 18:23 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Patrick Boettcher, Olivier Grenie, Wolfram Sang,
David Härdeman, linux-media, linux-kernel, Mariusz Kozlowski
Seems like 'adap->fe' test for NULL was meant to be before we dereference
that pointer.
Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
---
drivers/media/dvb/dvb-usb/dib0700_devices.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 97af266..b48f1e0 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -2439,12 +2439,11 @@ 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]);
-
- dib7090_slave_reset(adap->fe);
-
if (adap->fe == NULL)
return -ENODEV;
+ dib7090_slave_reset(adap->fe);
+
return 0;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [media] dib0700: fix possible NULL pointer dereference
2011-03-26 18:23 [PATCH] [media] dib0700: fix possible NULL pointer dereference Mariusz Kozlowski
@ 2011-04-03 15:44 ` Patrick Boettcher
0 siblings, 0 replies; 2+ messages in thread
From: Patrick Boettcher @ 2011-04-03 15:44 UTC (permalink / raw)
To: Mariusz Kozlowski
Cc: Mauro Carvalho Chehab, Patrick Boettcher, Olivier Grenie,
Wolfram Sang, David Härdeman, linux-media, linux-kernel
On Saturday 26 March 2011 19:23:56 Mariusz Kozlowski wrote:
> Seems like 'adap->fe' test for NULL was meant to be before we dereference
> that pointer.
>
> Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Thanks, applied.
--
Patrick Boettcher - KernelLabs
http://www.kernellabs.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-03 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-26 18:23 [PATCH] [media] dib0700: fix possible NULL pointer dereference Mariusz Kozlowski
2011-04-03 15:44 ` Patrick Boettcher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).