summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-09-18 18:53:32 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-09-19 00:28:07 +0200
commit4fef1250eafddc5182cd5c3c354a6971bcf7520d (patch)
tree495fb2fdc2ac6ba2e601ac2197a2a2c72338fe63 /drivers/input
parentInput: elantech - enable middle button of touchpad on ThinkPad P72 (diff)
downloadlinux-4fef1250eafddc5182cd5c3c354a6971bcf7520d.tar.xz
linux-4fef1250eafddc5182cd5c3c354a6971bcf7520d.zip
Input: uinput - allow for max == min during input_absinfo validation
These values are inclusive, so a range of 1 requires min == max. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/uinput.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 96a887f33698..eb14ddf69346 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
min = abs->minimum;
max = abs->maximum;
- if ((min != 0 || max != 0) && max <= min) {
+ if ((min != 0 || max != 0) && max < min) {
printk(KERN_DEBUG
"%s: invalid abs[%02x] min:%d max:%d\n",
UINPUT_NAME, code, min, max);