regulator: max597x: Fix error return code in max597x_get_status
PATCH 1/1 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 <[email protected]>
--- drivers/regulator/max597x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/max597x-regulator.c +1 -1
@@ -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 ;
Signature · 1 line
2.34.1