Skip to content

Commit d056656

Browse files
AxelLinbroonie
authored andcommitted
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>
1 parent 7f62cb8 commit d056656

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/max597x-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static int max597x_get_status(struct regulator_dev *rdev)
193193

194194
ret = regmap_read(rdev->regmap, MAX5970_REG_STATUS3, &val);
195195
if (ret)
196-
return REGULATOR_FAILED_RETRY;
196+
return ret;
197197

198198
if (val & MAX5970_STATUS3_ALERT)
199199
return REGULATOR_STATUS_ERROR;

0 commit comments

Comments
 (0)