summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2016-05-24 13:34:50 -0500
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 11:28:16 -0700
commitd97fca12e92d3179554baf4db42611e5fe56aeed (patch)
tree9c99f92c2a58ad2849102803ed5c177f796c3e3f /drivers/staging
parent66394300c37e9321a913f269021b3d6c92d786ad (diff)
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: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/greybus/light.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index 8b71ed3df318..78fb8a9f6a48 100644
--- a/drivers/staging/greybus/light.c
+++ b/drivers/staging/greybus/light.c
@@ -1019,8 +1019,7 @@ 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);
+ flush_work(&channel->work_brightness_set);
#endif
kfree(channel->attrs);
kfree(channel->attr_group);