Skip to content

Commit

Permalink
regulator: 88pm800: forever loop in pm800_regulator_probe()
Browse files Browse the repository at this point in the history
This is supposed to be testing "i < ARRAY_SIZE()" instead of just
"ARRAY_SIZE()".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Dan Carpenter authored and Mark Brown committed Aug 14, 2013
1 parent 19c6b54 commit 720c027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/88pm800.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ static int pm800_regulator_probe(struct platform_device *pdev)
unsigned int count = 0;

/* 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])
count++;
}
Expand Down

0 comments on commit 720c027

Please sign in to comment.