diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2018-09-18 12:53:32 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-09-18 18:28:07 -0400 |
| commit | 4fef1250eafddc5182cd5c3c354a6971bcf7520d (patch) | |
| tree | 495fb2fdc2ac6ba2e601ac2197a2a2c72338fe63 /drivers | |
| parent | 91a97507323e1ad4bfc10f4a5922e67cdaf8b3cd (diff) | |
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')
| -rw-r--r-- | drivers/input/misc/uinput.c | 2 |
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, | |||
| 410 | min = abs->minimum; | 410 | min = abs->minimum; |
| 411 | max = abs->maximum; | 411 | max = abs->maximum; |
| 412 | 412 | ||
| 413 | if ((min != 0 || max != 0) && max <= min) { | 413 | if ((min != 0 || max != 0) && max < min) { |
| 414 | printk(KERN_DEBUG | 414 | printk(KERN_DEBUG |
| 415 | "%s: invalid abs[%02x] min:%d max:%d\n", | 415 | "%s: invalid abs[%02x] min:%d max:%d\n", |
| 416 | UINPUT_NAME, code, min, max); | 416 | UINPUT_NAME, code, min, max); |
