[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506-regulator-devm_regulator_get_enable_read_voltage-fixes-v1-1-356cdd152067@baylibre.com>
Date: Mon, 6 May 2024 10:59:15 -0500
From: David Lechner <dlechner@...libre.com>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: David Lechner <dlechner@...libre.com>,
Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org
Subject: [PATCH 1/2] regulator: devres: fix devm_regulator_get_enable_read_voltage() return
The devm_regulator_get_enable_read_voltage() function is supposed to
return the voltage that the regulator is currently set to. However, it
currently returns 0.
Fixes: b250c20b6429 ("regulator: devres: add API for reference voltage supplies")
Signed-off-by: David Lechner <dlechner@...libre.com>
---
drivers/regulator/devres.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 4f290b9b559b..7111c46e9de1 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -193,7 +193,7 @@ int devm_regulator_get_enable_read_voltage(struct device *dev, const char *id)
if (ret < 0)
goto err_release_action;
- return 0;
+ return ret;
err_release_action:
devm_release_action(dev, regulator_action_disable, r);
--
2.43.2
Powered by blists - more mailing lists