diff options
author | David Lechner <dlechner@baylibre.com> | 2024-05-06 18:59:15 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-07 04:31:47 +0300 |
commit | 257b2335eebf51e318db1f3b2d023512da46fa66 (patch) | |
tree | 2081297bc40b2bc515120d160b8597dd815f66b3 /drivers/regulator/devres.c | |
parent | 48b6faae69a432b76e453c73ff5210bf5affa936 (diff) | |
download | linux-257b2335eebf51e318db1f3b2d023512da46fa66.tar.xz |
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@baylibre.com>
Link: https://lore.kernel.org/r/20240506-regulator-devm_regulator_get_enable_read_voltage-fixes-v1-1-356cdd152067@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/devres.c')
-rw-r--r-- | drivers/regulator/devres.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |