mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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>
This commit is contained in:
parent
c53b0b27d5
commit
4923314354
1 changed files with 0 additions and 5 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue