Skip to contentSkip to conversation

ACPI / osl: remove an unneeded NULL check

PATCH Superseded Dan Carpenter 1 participant 1 message Oct 18, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / osl: remove an unneeded NULL check

"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.

drivers/acpi/osl.c +1 -1
index 50d40e5..a0c09ad 100644
@@ -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 = '"')