From: Adrian Bunk <bunk@kernel.org>
To: Rene Herman <rene.herman@gmail.com>, ambx1@neo.rr.com
Cc: linux-kernel@vger.kernel.org
Subject: pnp_bus_resume(): inconsequent NULL checking
Date: Wed, 20 Feb 2008 00:49:08 +0200 [thread overview]
Message-ID: <20080219224908.GM31955@cs181133002.pp.htv.fi> (raw)
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
next reply other threads:[~2008-02-19 22:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 22:49 Adrian Bunk [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080219224908.GM31955@cs181133002.pp.htv.fi \
--to=bunk@kernel.org \
--cc=ambx1@neo.rr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®