Skip to content

Commit

Permalink
Merge remote-tracking branch 'regulator/fix/core' into tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Mar 5, 2013
2 parents 6dbe51c + fbe3105 commit 5fb910d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5fb910d

Please sign in to comment.