evdev: return an error if the profile change failed
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Apr 2018 00:56:32 +0000 (10:56 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 12 Apr 2018 01:45:58 +0000 (11:45 +1000)
If we get to this point, we've already ruled out invalid arguments and this
shouldn't really fail, so let's reply with UNSUPPORTED instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/evdev.c

index cb35cfe..de1f989 100644 (file)
@@ -1025,6 +1025,7 @@ evdev_accel_config_set_profile(struct libinput_device *libinput_device,
                filter_destroy(filter);
        } else {
                device->pointer.filter = filter;
+               return LIBINPUT_CONFIG_STATUS_UNSUPPORTED;
        }
 
        return LIBINPUT_CONFIG_STATUS_SUCCESS;