aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/proc.c')
-rw-r--r--drivers/acpi/proc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index d0d550d22a6..d0d25e2e1ce 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -393,11 +393,13 @@ acpi_system_write_wakeup_device(struct file *file,
struct list_head *node, *next;
char strbuf[5];
char str[5] = "";
- int len = count;
+ unsigned int len = count;
struct acpi_device *found_dev = NULL;
if (len > 4)
len = 4;
+ if (len < 0)
+ return -EFAULT;
if (copy_from_user(strbuf, buffer, len))
return -EFAULT;