diff mbox series

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

Message ID 20220513062622.155433-14-etienne.carriere@linaro.org
State Superseded
Headers show
Series SCMI multi-channel and optee shm | expand

Commit Message

Etienne Carriere May 13, 2022, 6:26 a.m. UTC
Simplify scmi_voltd_set_enable() exit sequence.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
 drivers/power/regulator/scmi_regulator.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Jaehoon Chung May 16, 2022, 11:45 p.m. UTC | #1
On 5/13/22 15:26, Etienne Carriere wrote:
> Simplify scmi_voltd_set_enable() exit sequence.
> 
> Cc: Jaehoon Chung <jh80.chung@samsung.com>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>


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

Best Regards,
Jaehoon Chung

> ---
>  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 e0343e913f4..6affa457991 100644
> --- a/drivers/power/regulator/scmi_regulator.c
> +++ b/drivers/power/regulator/scmi_regulator.c
> @@ -43,11 +43,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)
diff mbox series

Patch

diff --git a/drivers/power/regulator/scmi_regulator.c b/drivers/power/regulator/scmi_regulator.c
index e0343e913f4..6affa457991 100644
--- a/drivers/power/regulator/scmi_regulator.c
+++ b/drivers/power/regulator/scmi_regulator.c
@@ -43,11 +43,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)