diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-08-15 10:38:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 11:30:34 -0400 |
commit | 56760f07a7948d53b807c8f00c1639df9acf97fd (patch) | |
tree | a894fb39271b09b5364959eb541d6298640e50d6 /drivers/media/dvb/dvb-usb/dibusb-mb.c | |
parent | 1e805e679a4e92099c62cc952cd668a6c683e849 (diff) |
V4L/DVB (4525): Drivers/media/dvb/dvb-usb/dibusb-mb.c: NULL dereference
The Coverity checker spotted the following "we dereference d->fe only
when we know it's NULL" bug:
<-- snip -->
...
static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d)
{
...
if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) {
d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c;
d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
return -ENODEV;
}
...
<-- snip -->
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-mb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-mb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index f181d10fd88d..5439889af2f5 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -21,11 +21,11 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d) | |||
21 | 21 | ||
22 | demod_cfg.demod_address = 0x8; | 22 | demod_cfg.demod_address = 0x8; |
23 | 23 | ||
24 | if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) { | 24 | if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) |
25 | d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; | ||
26 | d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; | ||
27 | return -ENODEV; | 25 | return -ENODEV; |
28 | } | 26 | |
27 | d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; | ||
28 | d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; | ||
29 | 29 | ||
30 | d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; | 30 | d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; |
31 | 31 | ||