lkml.org 
[lkml]   [2017]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: greybus: light: remove unnecessary error check
Date
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>
---
drivers/staging/greybus/light.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index 0f538b8..d7da475 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)
--
2.7.4
\
 
 \ /
  Last update: 2017-09-23 10:10    [W:0.024 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site