mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2026-05-09 08:18:07 +02:00
test: don't check for a max on EV_SYN events
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
598bebfd92
commit
27991828a6
1 changed files with 5 additions and 3 deletions
|
|
@ -368,9 +368,11 @@ uinput_device_event(const struct uinput_device *dev, unsigned int type, unsigned
|
||||||
if (type > EV_MAX)
|
if (type > EV_MAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
max = type_to_mask_const(&dev->d, type, &mask);
|
if (type != EV_SYN) {
|
||||||
if (max == -1 || code > max)
|
max = type_to_mask_const(&dev->d, type, &mask);
|
||||||
return -EINVAL;
|
if (max == -1 || code > max)
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
ev.type = type;
|
ev.type = type;
|
||||||
ev.code = code;
|
ev.code = code;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue