evdev: Make error handling more consistent
authorJonas Ådahl <jadahl@gmail.com>
Wed, 22 Jan 2014 22:43:45 +0000 (23:43 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 22 Jan 2014 22:43:45 +0000 (23:43 +0100)
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/evdev.c

index 43f0c1b..ee6b0b9 100644 (file)
@@ -628,8 +628,7 @@ evdev_device_create(struct libinput_seat *seat,
                goto err;
 
        if (device->seat_caps == 0) {
-               evdev_device_destroy(device);
-               return NULL;
+               goto err;
        }
 
        /* If the dispatch was not set up use the fallback. */