Linux ACPI
 help / color / mirror / Atom feed
* [patch] ACPI / osl: remove an unneeded NULL check
@ 2013-10-18  9:01 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-10-18  9:01 UTC (permalink / raw)
  To: Len Brown; +Cc: Rafael J. Wysocki, linux-acpi, kernel-janitors

"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 == '"')

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-18  9:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-18  9:01 [patch] ACPI / osl: remove an unneeded NULL check Dan Carpenter

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