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:
Thomas Hindoe Paaboel Andersen
2015-08-30 21:46:44 +02:00
parent 89559b3720
commit 1439ba0f66

View File

@@ -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);