From 720c027303b91ea7320dc9da51b502633c9fece4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 14 Aug 2013 19:14:03 +0300 Subject: 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 Reviewed-by: Axel Lin Signed-off-by: Mark Brown --- drivers/regulator/88pm800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator/88pm800.c') 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++; } -- cgit v1.2.3-58-ga151