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

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
...@@ -302,7 +302,7 @@ static int pm800_regulator_probe(struct platform_device *pdev) ...@@ -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++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment