From 27991828a66890a2e14bc5a93d435855bcee2d74 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 27 Jun 2013 11:02:39 +1000 Subject: [PATCH] test: don't check for a max on EV_SYN events Signed-off-by: Peter Hutterer --- test/test-common-uinput.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test-common-uinput.c b/test/test-common-uinput.c index db19ac0..691818b 100644 --- a/test/test-common-uinput.c +++ b/test/test-common-uinput.c @@ -368,9 +368,11 @@ uinput_device_event(const struct uinput_device *dev, unsigned int type, unsigned if (type > EV_MAX) return -EINVAL; - max = type_to_mask_const(&dev->d, type, &mask); - if (max == -1 || code > max) - return -EINVAL; + if (type != EV_SYN) { + max = type_to_mask_const(&dev->d, type, &mask); + if (max == -1 || code > max) + return -EINVAL; + } ev.type = type; ev.code = code;