public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* pnp_bus_resume(): inconsequent NULL checking
@ 2008-02-19 22:49 Adrian Bunk
  2008-02-20  0:00 ` Rene Herman
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2008-02-19 22:49 UTC (permalink / raw)
  To: Rene Herman, ambx1; +Cc: linux-kernel

The Coverity checker spotted the following inconsequent NULL checking 
introduced by commit 5d38998ed15b31f524bde9a193d60150af30d916:

<--  snip  -->

...
static int pnp_bus_resume(struct device *dev)
{
...
        if (pnp_dev->protocol && pnp_dev->protocol->resume)
                pnp_dev->protocol->resume(pnp_dev);

        if (pnp_can_write(pnp_dev)) {
...

<--  snip  -->

pnp_can_write(pnp_dev) dereferences pnp_dev->protocol.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2008-02-21 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 22:49 pnp_bus_resume(): inconsequent NULL checking Adrian Bunk
2008-02-20  0:00 ` Rene Herman
2008-02-20 16:59   ` Bjorn Helgaas
2008-02-21  5:47     ` Rene Herman
2008-02-21 15:26       ` Bjorn Helgaas
2008-02-21 16:09         ` Adrian Bunk
2008-02-21 16:18         ` Rene Herman

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