Commit 4fef1250 authored by Peter Hutterer's avatar Peter Hutterer Committed by Dmitry Torokhov

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: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarMartin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 91a97507
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment