summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/88pm800.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 18:14:03 +0200
committerMark Brown <broonie@linaro.org>2013-08-14 20:09:44 +0200
commit720c027303b91ea7320dc9da51b502633c9fece4 (patch)
treefd037df7226651814f037230d28275b15cef5afa /drivers/regulator/88pm800.c
parentregulator: 88pm800: Fix checking whether num_regulator is valid (diff)
downloadlinux-720c027303b91ea7320dc9da51b502633c9fece4.tar.xz
linux-720c027303b91ea7320dc9da51b502633c9fece4.zip
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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/88pm800.c')
-rw-r--r--drivers/regulator/88pm800.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index f42356552f21..b30f5ce659d1 100644
--- a/drivers/regulator/88pm800.c
+++ b/drivers/regulator/88pm800.c
@@ -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++;
}