[PATCH v2 13/14] power: regulator: scmi: simplify scmi_voltd_set_enable()

Jaehoon Chung jh80.chung at samsung.com
Tue Jun 14 04:13:53 CEST 2022


On 6/1/22 01:09, Etienne Carriere wrote:
> Simplify scmi_voltd_set_enable() exit sequence.
> 
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>

Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>

Best Regards,
Jaehoon Chung

> ---
> No change since v1.
> 
> ---
>  drivers/power/regulator/scmi_regulator.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/power/regulator/scmi_regulator.c b/drivers/power/regulator/scmi_regulator.c
> index 352daa9bbc9..801148036ff 100644
> --- a/drivers/power/regulator/scmi_regulator.c
> +++ b/drivers/power/regulator/scmi_regulator.c
> @@ -51,11 +51,7 @@ static int scmi_voltd_set_enable(struct udevice *dev, bool enable)
>  	if (ret)
>  		return ret;
>  
> -	ret = scmi_to_linux_errno(out.status);
> -	if (ret)
> -		return ret;
> -
> -	return ret;
> +	return scmi_to_linux_errno(out.status);
>  }
>  
>  static int scmi_voltd_get_enable(struct udevice *dev)



More information about the U-Boot mailing list