Merge branch 'regulator-5.4' into regulator-5.5
[sfrench/cifs-2.6.git] / drivers / regulator / da9062-regulator.c
index 710e67081d531e630d972feadfd08b177b6748bd..9bb8950064555dadd3bfaaebb04afbb2ac0d97f7 100644 (file)
@@ -942,8 +942,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
        regulators->n_regulators = max_regulators;
        platform_set_drvdata(pdev, regulators);
 
-       n = 0;
-       while (n < regulators->n_regulators) {
+       for (n = 0; n < regulators->n_regulators; n++) {
                /* Initialise regulator structure */
                regl = &regulators->regulator[n];
                regl->hw = chip;
@@ -1002,8 +1001,6 @@ static int da9062_regulator_probe(struct platform_device *pdev)
                                regl->desc.name);
                        return PTR_ERR(regl->rdev);
                }
-
-               n++;
        }
 
        /* LDOs overcurrent event support */