diff options
Diffstat (limited to 'drivers/input/mouse/logips2pp.c')
-rw-r--r-- | drivers/input/mouse/logips2pp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index faac2c3bef74..84de2fc6acc1 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
@@ -155,9 +155,14 @@ static ssize_t ps2pp_attr_show_smartscroll(struct psmouse *psmouse, | |||
155 | static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data, | 155 | static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data, |
156 | const char *buf, size_t count) | 156 | const char *buf, size_t count) |
157 | { | 157 | { |
158 | unsigned long value; | 158 | unsigned int value; |
159 | int err; | ||
159 | 160 | ||
160 | if (strict_strtoul(buf, 10, &value) || value > 1) | 161 | err = kstrtouint(buf, 10, &value); |
162 | if (err) | ||
163 | return err; | ||
164 | |||
165 | if (value > 1) | ||
161 | return -EINVAL; | 166 | return -EINVAL; |
162 | 167 | ||
163 | ps2pp_set_smartscroll(psmouse, value); | 168 | ps2pp_set_smartscroll(psmouse, value); |