aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/events.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-16 10:30:54 +0100
committeremersion <contact@emersion.fr>2017-11-16 10:30:54 +0100
commitbb79ada49f43be5417bdd55fda3a7cf07c2a69df (patch)
tree259eaade516ed43c99c78591741b4e4ef0d77b7d /backend/libinput/events.c
parentac78c6642a1c742c896f08282ee31c4f0d3acd51 (diff)
Fix a bunch of mistakes detected with scan-build
Diffstat (limited to 'backend/libinput/events.c')
-rw-r--r--backend/libinput/events.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index 5da45c67..3ca41124 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -66,10 +66,11 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
int product = libinput_device_get_id_product(libinput_dev);
const char *name = libinput_device_get_name(libinput_dev);
struct wl_list *wlr_devices = calloc(1, sizeof(struct wl_list));
- wl_list_init(wlr_devices);
if (!wlr_devices) {
- goto fail;
+ wlr_log(L_ERROR, "Allocation failed");
+ return;
}
+ wl_list_init(wlr_devices);
wlr_log(L_DEBUG, "Added %s [%d:%d]", name, vendor, product);
if (libinput_device_has_capability(libinput_dev, LIBINPUT_DEVICE_CAP_KEYBOARD)) {