From: Etienne Carriere Date: Tue, 31 May 2022 16:09:28 +0000 (+0200) Subject: power: regulator: scmi: simplify scmi_voltd_set_enable() X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=db59fef0f84859504cd0b81063d7540517167d7b;p=u-boot.git power: regulator: scmi: simplify scmi_voltd_set_enable() Simplify scmi_voltd_set_enable() exit sequence. Cc: Jaehoon Chung Signed-off-by: Etienne Carriere Reviewed-by: Jaehoon Chung --- diff --git a/drivers/power/regulator/scmi_regulator.c b/drivers/power/regulator/scmi_regulator.c index 352daa9bbc..801148036f 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)