aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/logips2pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/logips2pp.c')
-rw-r--r--drivers/input/mouse/logips2pp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c
index 0c5660d28ca..390f1dbb98a 100644
--- a/drivers/input/mouse/logips2pp.c
+++ b/drivers/input/mouse/logips2pp.c
@@ -157,10 +157,8 @@ static ssize_t ps2pp_attr_show_smartscroll(struct psmouse *psmouse, void *data,
157static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data, const char *buf, size_t count) 157static ssize_t ps2pp_attr_set_smartscroll(struct psmouse *psmouse, void *data, const char *buf, size_t count)
158{ 158{
159 unsigned long value; 159 unsigned long value;
160 char *rest;
161 160
162 value = simple_strtoul(buf, &rest, 10); 161 if (strict_strtoul(buf, 10, &value) || value > 1)
163 if (*rest || value > 1)
164 return -EINVAL; 162 return -EINVAL;
165 163
166 ps2pp_set_smartscroll(psmouse, value); 164 ps2pp_set_smartscroll(psmouse, value);