From: Peter Hutterer Date: Wed, 5 Feb 2014 23:26:00 +0000 (+1000) Subject: evdev: if mtdev failed to open, fail to init the device X-Git-Tag: 0.1.0~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e13f736cfffc071990fdd4292e00e3886e73bd42;p=platform%2Fupstream%2Flibinput.git 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 --- 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),