mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-08 07:33:53 +01:00
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 <phomes@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user