]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
staging: greybus: light: remove unnecessary error check
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Sat, 23 Sep 2017 08:09:15 +0000 (13:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Sep 2017 13:39:22 +0000 (15:39 +0200)
It is not necessary to check return value of gb_lights_channel_flash_config.
gb_lights_channel_config returns both successful and error value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/light.c

index 0f538b8c3a07629f56f85b92737472018553c0b8..d7da475f9d331f68294a5357b9fb813925612e30 100644 (file)
@@ -1000,11 +1000,7 @@ static int gb_lights_channel_config(struct gb_light *light,
 
        light->has_flash = true;
 
-       ret = gb_lights_channel_flash_config(channel);
-       if (ret < 0)
-               return ret;
-
-       return ret;
+       return gb_lights_channel_flash_config(channel);
 }
 
 static int gb_lights_light_config(struct gb_lights *glights, u8 id)