Input: uinput - allow for max == min during input_absinfo validation
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/input/misc/uinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/uinput.c +1 -1
@@ -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);
Signature · 1 line
2.17.1
Quoted 3 lines · Peter Hutterer
These values are inclusive, so a range of 1 requires min == max.
Signed-off-by Peter Hutterer <[email protected]>
true, nice catch.
Reviewed-by Martin Kepplinger <[email protected]>
Quoted 8 lines · Martin Kepplinger
Quoted 3 lines · Peter Hutterer
These values are inclusive, so a range of 1 requires min == max.
Signed-off-by Peter Hutterer <[email protected]>true, nice catch.
Reviewed-by Martin Kepplinger <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry