From: Adrian Bunk <bunk@stusta.de>
To: Rich Townsend <rhdt@bartol.udel.edu>
Cc: len.brown@intel.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: drivers/acpi/sbs.c:acpi_sbs_remove() inconsistent NULL checking
Date: Tue, 15 Aug 2006 00:48:39 +0200 [thread overview]
Message-ID: <20060814224839.GX3543@stusta.de> (raw)
The Coverity checker spotted the following inconsistent NULL checking
introduced by commit 3f86b83243d59bb50caf5938d284d22e10d082a4:
<-- snip -->
...
int acpi_sbs_remove(struct acpi_device *device, int type)
{
struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device);
int id;
if (!device || !sbs) {
return -EINVAL;
}
...
<-- snip -->
The NULL check for "device" is three lines after it got dereferenced the
first time.
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
reply other threads:[~2006-08-14 22:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060814224839.GX3543@stusta.de \
--to=bunk@stusta.de \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rhdt@bartol.udel.edu \
/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