Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 720c0273 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown
Browse files

regulator: 88pm800: forever loop in pm800_regulator_probe()



This is supposed to be testing "i < ARRAY_SIZE()" instead of just
"ARRAY_SIZE()".

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 19c6b544
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -302,7 +302,7 @@ static int pm800_regulator_probe(struct platform_device *pdev)
		unsigned int count = 0;
		unsigned int count = 0;


		/* Check whether num_regulator is valid. */
		/* Check whether num_regulator is valid. */
		for (i = 0; ARRAY_SIZE(pdata->regulators); i++) {
		for (i = 0; i < ARRAY_SIZE(pdata->regulators); i++) {
			if (pdata->regulators[i])
			if (pdata->regulators[i])
				count++;
				count++;
		}
		}