Skip to content
Commit 8edf7ac0 authored by John Keeping's avatar John Keeping Committed by Jaehoon Chung
Browse files

power: regulator: fix autoset error handling



If a regulator does not support .set_suspend_enable or
.set_suspend_value then ret is set to ENOSYS early in the function.

The most serious impact of this is that when no automatic setting of
voltage is needed then the final regulator_set_enable() is skipped
because ret has not been cleared.

It seems that the error handling for regulator_set_suspend_value() is
also wrong as if this succeeds then the normal boot-on checks are still
required, and again ENOSYS needs special treatment here.

Fixes: 11406b8f ("dm: regulator: support regulator more state")
Signed-off-by: default avatarJohn Keeping <john@metanate.com>
parent f9d16f2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment