diff options
Diffstat (limited to 'drivers/s390/char/sclp_async.c')
-rw-r--r-- | drivers/s390/char/sclp_async.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index f449c696e503..7ad30e72f868 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/stat.h> | 12 | #include <linux/stat.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
15 | #include <linux/kmod.h> | 16 | #include <linux/kmod.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
@@ -84,7 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, | |||
84 | rc = copy_from_user(buf, buffer, sizeof(buf)); | 85 | rc = copy_from_user(buf, buffer, sizeof(buf)); |
85 | if (rc != 0) | 86 | if (rc != 0) |
86 | return -EFAULT; | 87 | return -EFAULT; |
87 | buf[len - 1] = '\0'; | 88 | buf[sizeof(buf) - 1] = '\0'; |
88 | if (strict_strtoul(buf, 0, &val) != 0) | 89 | if (strict_strtoul(buf, 0, &val) != 0) |
89 | return -EINVAL; | 90 | return -EINVAL; |
90 | if (val != 0 && val != 1) | 91 | if (val != 0 && val != 1) |