lkml.org 
[lkml]   [2013]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 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>

diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index 58e9b74..3459f60 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++;
}

\
 
 \ /
  Last update: 2013-08-14 19:01    [W:0.059 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site