diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 1af8df203b72..686ef270ecf7 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1977,7 +1977,7 @@ int regulator_bulk_enable(int num_consumers, err: printk(KERN_ERR "Failed to enable %s: %d\n", consumers[i].supply, ret); - for (i = 0; i < num_consumers; i++) + for (--i; i >= 0; --i) regulator_disable(consumers[i].consumer); return ret; @@ -2013,7 +2013,7 @@ int regulator_bulk_disable(int num_consumers, err: printk(KERN_ERR "Failed to disable %s: %d\n", consumers[i].supply, ret); - for (i = 0; i < num_consumers; i++) + for (--i; i >= 0; --i) regulator_enable(consumers[i].consumer); return ret; |