filter: annotate the various variables we have with units
[platform/upstream/libinput.git] / src / udev-seat.c
index 9082697..635fabf 100644 (file)
@@ -351,6 +351,7 @@ libinput_udev_create_context(const struct libinput_interface *interface,
 
        if (libinput_init(&input->base, interface,
                          &interface_backend, user_data) != 0) {
+               libinput_unref(&input->base);
                free(input);
                return NULL;
        }
@@ -383,26 +384,3 @@ libinput_udev_assign_seat(struct libinput *libinput,
 
        return 0;
 }
-
-LIBINPUT_EXPORT struct libinput *
-libinput_udev_create_for_seat(const struct libinput_interface *interface,
-                             void *user_data,
-                             struct udev *udev,
-                             const char *seat_id)
-{
-       struct libinput *libinput;
-
-       if (!interface || !udev || !seat_id)
-               return NULL;
-
-       libinput = libinput_udev_create_context(interface, user_data, udev);
-       if (!libinput)
-               return NULL;
-
-       if (libinput_udev_assign_seat(libinput, seat_id) != 0) {
-               libinput_destroy(libinput);
-               libinput = NULL;
-       }
-
-       return libinput;
-}