summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/ab3100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/ab3100.c')
-rw-r--r--drivers/regulator/ab3100.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 1179099..b349266 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -634,12 +634,9 @@ static int __devinit ab3100_regulators_probe(struct platform_device *pdev)
"%s: failed to register regulator %s err %d\n",
__func__, ab3100_regulator_desc[i].name,
err);
- i--;
/* remove the already registered regulators */
- while (i > 0) {
+ while (--i >= 0)
regulator_unregister(ab3100_regulators[i].rdev);
- i--;
- }
return err;
}
OpenPOWER on IntegriCloud