[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170925142222.GB21407@arch-late.localdomain>
Date: Mon, 25 Sep 2017 15:22:22 +0100
From: Rui Miguel Silva <rmfrfs@...il.com>
To: Arvind Yadav <arvind.yadav.cs@...il.com>
Cc: johan@...nel.org, elder@...nel.org, gregkh@...uxfoundation.org,
greybus-dev@...ts.linaro.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: greybus: light: remove unnecessary error check
Hi,
On Sat, Sep 23, 2017 at 01:39:15PM +0530, Arvind Yadav wrote:
> 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@...il.com>
Thanks for the patch.
Reviewed-by: Rui Miguel Silva <rmfrfs@...il.com>
---
Cheers,
Rui
> ---
> 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
>
Powered by blists - more mailing lists