diff options
Diffstat (limited to 'drivers/regulator/core.c')
-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 1af8df203b7..686ef270ecf 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1977,7 +1977,7 @@ int regulator_bulk_enable(int num_consumers, | |||
1977 | 1977 | ||
1978 | err: | 1978 | err: |
1979 | printk(KERN_ERR "Failed to enable %s: %d\n", consumers[i].supply, ret); | 1979 | printk(KERN_ERR "Failed to enable %s: %d\n", consumers[i].supply, ret); |
1980 | for (i = 0; i < num_consumers; i++) | 1980 | for (--i; i >= 0; --i) |
1981 | regulator_disable(consumers[i].consumer); | 1981 | regulator_disable(consumers[i].consumer); |
1982 | 1982 | ||
1983 | return ret; | 1983 | return ret; |
@@ -2013,7 +2013,7 @@ int regulator_bulk_disable(int num_consumers, | |||
2013 | err: | 2013 | err: |
2014 | printk(KERN_ERR "Failed to disable %s: %d\n", consumers[i].supply, | 2014 | printk(KERN_ERR "Failed to disable %s: %d\n", consumers[i].supply, |
2015 | ret); | 2015 | ret); |
2016 | for (i = 0; i < num_consumers; i++) | 2016 | for (--i; i >= 0; --i) |
2017 | regulator_enable(consumers[i].consumer); | 2017 | regulator_enable(consumers[i].consumer); |
2018 | 2018 | ||
2019 | return ret; | 2019 | return ret; |