提交 4fef1250 编写于 作者: P Peter Hutterer 提交者: 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: NPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: NMartin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册