]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: regulator: scmi: simplify scmi_voltd_set_enable()
authorEtienne Carriere <etienne.carriere@linaro.org>
Tue, 31 May 2022 16:09:28 +0000 (18:09 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 17:12:56 +0000 (13:12 -0400)
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>
drivers/power/regulator/scmi_regulator.c

index 352daa9bbc9b07fa160488189a8f948dfa9effab..801148036ff6cf1adeaeffc0e61092f293d72b94 100644 (file)
@@ -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)