diff --git a/[refs] b/[refs] index 7bdcaa2080ef..29c0e5fb3d26 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66fd3835ac9a3740a7bf953b439e54dbc326d272 +refs/heads/master: 05bce79e6d24ee6eb2beddf0f6314358404d472f diff --git a/trunk/drivers/acpi/proc.c b/trunk/drivers/acpi/proc.c index 27adb090bb30..ef98796b3824 100644 --- a/trunk/drivers/acpi/proc.c +++ b/trunk/drivers/acpi/proc.c @@ -362,16 +362,13 @@ acpi_system_write_wakeup_device(struct file *file, struct list_head *node, *next; char strbuf[5]; char str[5] = ""; - unsigned int len = count; - if (len > 4) - len = 4; - if (len < 0) - return -EFAULT; + if (count > 4) + count = 4; - if (copy_from_user(strbuf, buffer, len)) + if (copy_from_user(strbuf, buffer, count)) return -EFAULT; - strbuf[len] = '\0'; + strbuf[count] = '\0'; sscanf(strbuf, "%s", str); mutex_lock(&acpi_device_lock);