public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] regulator: 88pm800: forever loop in pm800_regulator_probe()
@ 2013-08-14 16:14 Dan Carpenter
  2013-08-14 16:28 ` Axel Lin
  2013-08-14 18:09 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-08-14 16:14 UTC (permalink / raw)
  To: Liam Girdwood, Axel Lin; +Cc: Mark Brown, linux-kernel, kernel-janitors

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++;
 		}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] regulator: 88pm800: forever loop in pm800_regulator_probe()
  2013-08-14 16:14 [patch] regulator: 88pm800: forever loop in pm800_regulator_probe() Dan Carpenter
@ 2013-08-14 16:28 ` Axel Lin
  2013-08-14 18:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2013-08-14 16:28 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Liam Girdwood, Mark Brown, linux-kernel@vger.kernel.org,
	kernel-janitors

2013/8/15 Dan Carpenter <dan.carpenter@oracle.com>:
> 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++;
>                 }
Oops. My bad. Thanks for the fix.
Reviewed-by: Axel Lin <axel.lin@ingics.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] regulator: 88pm800: forever loop in pm800_regulator_probe()
  2013-08-14 16:14 [patch] regulator: 88pm800: forever loop in pm800_regulator_probe() Dan Carpenter
  2013-08-14 16:28 ` Axel Lin
@ 2013-08-14 18:09 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-08-14 18:09 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Liam Girdwood, Axel Lin, linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

On Wed, Aug 14, 2013 at 07:14:03PM +0300, Dan Carpenter wrote:
> This is supposed to be testing "i < ARRAY_SIZE()" instead of just
> "ARRAY_SIZE()".

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-14 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 16:14 [patch] regulator: 88pm800: forever loop in pm800_regulator_probe() Dan Carpenter
2013-08-14 16:28 ` Axel Lin
2013-08-14 18:09 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox