From 1439ba0f6688f8cb4d740d2a16156e6ba5176f25 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Sun, 30 Aug 2015 21:46:44 +0200 Subject: [PATCH] remove needless null check profile was already dereferenced earlier in the function and cannot be null anyway from the current callers of the function. Signed-off-by: Thomas Hindoe Paaboel Andersen --- src/libratbag.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libratbag.c b/src/libratbag.c index 82dc8a22..06e10e07 100644 --- a/src/libratbag.c +++ b/src/libratbag.c @@ -527,8 +527,7 @@ ratbag_create_button(struct ratbag_profile *profile, unsigned int index) button->profile = profile; button->index = index; - if (profile) - list_insert(&profile->buttons, &button->link); + list_insert(&profile->buttons, &button->link); if (device->driver->read_button) device->driver->read_button(button);