public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/media/dvb/dvb-usb/dibusb-mb.c: NULL dereference
@ 2006-08-14 23:15 Adrian Bunk
  2006-08-15 14:43 ` Patrick Boettcher
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2006-08-14 23:15 UTC (permalink / raw)
  To: patrick.boettcher, v4l-dvb-maintainer; +Cc: linux-kernel

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  -->

cu
Adrian

-- 

    Gentoo kernels are 42 times more popular than SUSE kernels among
    KLive users  (a service by SUSE contractor Andrea Arcangeli that
    gathers data about kernels from many users worldwide).

       There are three kinds of lies: Lies, Damn Lies, and Statistics.
                                                    Benjamin Disraeli


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-15 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-14 23:15 drivers/media/dvb/dvb-usb/dibusb-mb.c: NULL dereference Adrian Bunk
2006-08-15 14:43 ` Patrick Boettcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox