summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/power/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 54ec071de33..428f8a034e9 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -422,7 +422,7 @@ static ssize_t autosleep_store(struct kobject *kobj,
int error;
if (state == PM_SUSPEND_ON
- && !(strncmp(buf, "off", 3) && strncmp(buf, "off\n", 4)))
+ && strcmp(buf, "off") && strcmp(buf, "off\n"))
return -EINVAL;
error = pm_autosleep_set_state(state);