lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Aug 2013 00:28:33 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] regulator: 88pm800: forever loop in pm800_regulator_probe()

2013/8/15 Dan Carpenter <dan.carpenter@...cle.com>:
> This is supposed to be testing "i < ARRAY_SIZE()" instead of just
> "ARRAY_SIZE()".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.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@...ics.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ