diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-05 02:12:20 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-05 02:12:20 (GMT) |
commit | 5fb910d39133cc28ec25d4b2eea26b48f3ab4ef1 (patch) | |
tree | 1040b83ee991152ed7785ba27fe1c6710c77fdb2 /drivers | |
parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
parent | fbe31057fafebdc2811a7101b8b4a0460f5417d1 (diff) | |
download | linux-fsl-qoriq-5fb910d39133cc28ec25d4b2eea26b48f3ab4ef1.tar.xz |
Merge remote-tracking branch 'regulator/fix/core' into tmp
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index da9782b..4a7790c 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -3057,9 +3057,13 @@ int regulator_bulk_enable(int num_consumers, return 0; err: - pr_err("Failed to enable %s: %d\n", consumers[i].supply, ret); - while (--i >= 0) - regulator_disable(consumers[i].consumer); + for (i = 0; i < num_consumers; i++) { + if (consumers[i].ret < 0) + pr_err("Failed to enable %s: %d\n", consumers[i].supply, + consumers[i].ret); + else + regulator_disable(consumers[i].consumer); + } return ret; } |