Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d97fca12 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman
Browse files

greybus: fix pointless null check



Coccinelle points out that a call in gb_lights_channel_free() to
flush_work() is passed which is always non-null.   Prior to the
call, there is an unnecessary check to see if that address is null.
Get rid of the test.

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 66394300
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1019,7 +1019,6 @@ static int gb_lights_light_register(struct gb_light *light)
static void gb_lights_channel_free(struct gb_channel *channel)
{
#ifndef LED_HAVE_SET_BLOCKING
	if (&channel->work_brightness_set)
	flush_work(&channel->work_brightness_set);
#endif
	kfree(channel->attrs);