Commit 49233143 authored by Rui Miguel Silva's avatar Rui Miguel Silva Committed by Greg Kroah-Hartman

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: default avatarRui Miguel Silva <rui.silva@linaro.org>
Reported-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent c53b0b27
...@@ -1026,9 +1026,6 @@ static void gb_lights_channel_free(struct gb_channel *channel) ...@@ -1026,9 +1026,6 @@ static void gb_lights_channel_free(struct gb_channel *channel)
static void gb_lights_channel_release(struct gb_channel *channel) static void gb_lights_channel_release(struct gb_channel *channel)
{ {
if (!channel)
return;
channel->releasing = true; channel->releasing = true;
gb_lights_channel_unregister(channel); gb_lights_channel_unregister(channel);
...@@ -1041,8 +1038,6 @@ static void gb_lights_light_release(struct gb_light *light) ...@@ -1041,8 +1038,6 @@ static void gb_lights_light_release(struct gb_light *light)
int i; int i;
int count; int count;
if (!light)
return;
count = light->channels_count; count = light->channels_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment