From e13f736cfffc071990fdd4292e00e3886e73bd42 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Feb 2014 09:26:00 +1000 Subject: [PATCH] evdev: if mtdev failed to open, fail to init the device We can't handle protocol A devices properly without mtdev, so skip the device altogether. Signed-off-by: Peter Hutterer --- src/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 61ab0833..9c6d1167 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -544,7 +544,7 @@ evdev_configure_device(struct evdev_device *device) if (!TEST_BIT(abs_bits, ABS_MT_SLOT)) { device->mtdev = mtdev_new_open(device->fd); if (!device->mtdev) - return 0; + return -1; device->mt.slot = device->mtdev->caps.slot.value; } else { ioctl(device->fd, EVIOCGABS(ABS_MT_SLOT),