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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 7f62cb8 commit d056656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)