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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2014-02-06 09:26:00 +10:00
parent 9d3fbabb5e
commit e13f736cff

View file

@ -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),