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-next>] [day] [month] [year] [list]
Message-ID: <20130814161403.GA13601@elgon.mountain>
Date:	Wed, 14 Aug 2013 19:14:03 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Liam Girdwood <lgirdwood@...il.com>, Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
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@...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++;
 		}
--
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