summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/light.c
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2016-02-17 14:32:51 +0000
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-17 15:24:09 -0800
commit492331435465977407e43865c19e34918cd90a66 (patch)
tree0f9fd243a248ccb484f568f9742fe6af411dcce1 /drivers/staging/greybus/light.c
parentc53b0b27d57cc1dff50080c911b48b2af7728dc4 (diff)
greybus: lights: remove unnecessary checks
We do not need to check for channels and lights as they can never be NULL as a big memory array elements. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/light.c')
-rw-r--r--drivers/staging/greybus/light.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index 70fcade451dc..6c5b9994457c 100644
--- a/drivers/staging/greybus/light.c
+++ b/drivers/staging/greybus/light.c
@@ -1026,9 +1026,6 @@ static void gb_lights_channel_free(struct gb_channel *channel)
static void gb_lights_channel_release(struct gb_channel *channel)
{
- if (!channel)
- return;
-
channel->releasing = true;
gb_lights_channel_unregister(channel);
@@ -1041,8 +1038,6 @@ static void gb_lights_light_release(struct gb_light *light)
int i;
int count;
- if (!light)
- return;
count = light->channels_count;