summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-09-18 09:53:32 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-09-18 15:28:07 -0700
commit4fef1250eafddc5182cd5c3c354a6971bcf7520d (patch)
tree495fb2fdc2ac6ba2e601ac2197a2a2c72338fe63 /drivers/input/misc
parent91a97507323e1ad4bfc10f4a5922e67cdaf8b3cd (diff)
downloadblackbird-obmc-linux-4fef1250eafddc5182cd5c3c354a6971bcf7520d.tar.gz
blackbird-obmc-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/misc')
-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);
OpenPOWER on IntegriCloud