From: Arvind Yadav Date: Sat, 23 Sep 2017 08:09:15 +0000 (+0530) Subject: staging: greybus: light: remove unnecessary error check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1cd5929ab675b285e2179ec33cb0fef185aaabd1;p=linux.git staging: greybus: light: remove unnecessary error check 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 Reviewed-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c index 0f538b8c3a076..d7da475f9d331 100644 --- a/drivers/staging/greybus/light.c +++ b/drivers/staging/greybus/light.c @@ -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)