diff options
author | Axel Lin <axel.lin@ingics.com> | 2023-02-20 13:56:14 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-20 17:32:21 +0300 |
commit | d0566564d483e6576868224286632fd95aafd4ac (patch) | |
tree | 4608df78076b8bb674bddbae755e691d748ddcea /drivers/regulator/max597x-regulator.c | |
parent | 7f62cb8861190e7cc1018ff37597fc49b2eaafa8 (diff) | |
download | linux-d0566564d483e6576868224286632fd95aafd4ac.tar.xz |
regulator: max597x: Fix error return code in max597x_get_status
REGULATOR_FAILED_RETRY should not be used in max597x_get_status error path.
Othewise, the regulator core will treat it as REGULATOR_STATUS_ON.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20230220105614.356187-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max597x-regulator.c')
-rw-r--r-- | drivers/regulator/max597x-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max597x-regulator.c b/drivers/regulator/max597x-regulator.c index f0fb0f56e420..648e3641885a 100644 --- a/drivers/regulator/max597x-regulator.c +++ b/drivers/regulator/max597x-regulator.c @@ -193,7 +193,7 @@ static int max597x_get_status(struct regulator_dev *rdev) ret = regmap_read(rdev->regmap, MAX5970_REG_STATUS3, &val); if (ret) - return REGULATOR_FAILED_RETRY; + return ret; if (val & MAX5970_STATUS3_ALERT) return REGULATOR_STATUS_ERROR; |