summaryrefslogtreecommitdiff
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index d0d550d22a6..f8b6f555ba5 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -398,6 +398,8 @@ acpi_system_write_wakeup_device(struct file *file,
if (len > 4)
len = 4;
+ if (len < 0)
+ return -EFAULT;
if (copy_from_user(strbuf, buffer, len))
return -EFAULT;