Skip to content

Commit 4fef125

Browse files
whotdtor
authored andcommitted
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>
1 parent 91a9750 commit 4fef125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/misc/uinput.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
410410
min = abs->minimum;
411411
max = abs->maximum;
412412

413-
if ((min != 0 || max != 0) && max <= min) {
413+
if ((min != 0 || max != 0) && max < min) {
414414
printk(KERN_DEBUG
415415
"%s: invalid abs[%02x] min:%d max:%d\n",
416416
UINPUT_NAME, code, min, max);

0 commit comments

Comments
 (0)