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]
Date:	Sat, 29 Jun 2013 12:04:19 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	Jonghwa Lee <jonghwa3.lee@...sung.com>,
	Myungjoo Ham <myungjoo.ham@...sung.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] regulator: max77693: Skip register regulator if no platform
 initialization data

The code in max77693_pmic_dt_parse_rdata() does skip setting rdata if
!rmatch[i].init_data. So we may have some empty entries in rdata[].
We need to skip register regulator if no platform initialization data,
otherwise we may resiter regulator with invalid settings ( the empty entries
of rdata[]).

Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
 drivers/regulator/max77693.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c
index d45a4dd..6116a49 100644
--- a/drivers/regulator/max77693.c
+++ b/drivers/regulator/max77693.c
@@ -265,6 +265,9 @@ static int max77693_pmic_probe(struct platform_device *pdev)
 	for (i = 0; i < max77693_pmic->num_regulators; i++) {
 		int id = rdata[i].id;
 
+		if (!rdata[i].initdata)
+			continue;
+
 		config.init_data = rdata[i].initdata;
 		config.of_node = rdata[i].of_node;
 
-- 
1.8.1.2



--
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