From: Dan Carpenter <dan.carpenter@oracle.com>
To: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-acpi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ACPI / osl: remove an unneeded NULL check
Date: Fri, 18 Oct 2013 12:01:43 +0300 [thread overview]
Message-ID: <20131018090143.GB14256@longonot.mountain> (raw)
"str" is never NULL here so I have removed the check. There are static
checkers which complain about superfluous NULL checks because it may
indicate confusion or a bug.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 50d40e5..a0c09ad 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1355,7 +1355,7 @@ static int __init acpi_os_name_setup(char *str)
if (!str || !*str)
return 0;
- for (; count-- && str && *str; str++) {
+ for (; count-- && *str; str++) {
if (isalnum(*str) || *str == ' ' || *str == ':')
*p++ = *str;
else if (*str == '\'' || *str == '"')
reply other threads:[~2013-10-18 9:01 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=20131018090143.GB14256@longonot.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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