diff options
-rw-r--r-- | drivers/regulator/core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b899947d839d..0e271e57504a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -3807,9 +3807,11 @@ int regulator_suspend_finish(void) | |||
3807 | list_for_each_entry(rdev, ®ulator_list, list) { | 3807 | list_for_each_entry(rdev, ®ulator_list, list) { |
3808 | mutex_lock(&rdev->mutex); | 3808 | mutex_lock(&rdev->mutex); |
3809 | if (rdev->use_count > 0 || rdev->constraints->always_on) { | 3809 | if (rdev->use_count > 0 || rdev->constraints->always_on) { |
3810 | error = _regulator_do_enable(rdev); | 3810 | if (!_regulator_is_enabled(rdev)) { |
3811 | if (error) | 3811 | error = _regulator_do_enable(rdev); |
3812 | ret = error; | 3812 | if (error) |
3813 | ret = error; | ||
3814 | } | ||
3813 | } else { | 3815 | } else { |
3814 | if (!have_full_constraints()) | 3816 | if (!have_full_constraints()) |
3815 | goto unlock; | 3817 | goto unlock; |