diff options
-rw-r--r-- | drivers/regulator/ab8500.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index cc7cbaf..3d09580 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -369,11 +369,9 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to register regulator %s\n", info->desc.name); /* when we fail, un-register all earlier regulators */ - i--; - while (i > 0) { + while (--i >= 0) { info = &ab8500_regulator_info[i]; regulator_unregister(info->regulator); - i--; } return err; } |