From: Sachin Kamat Date: Fri, 14 Feb 2014 11:50:00 +0000 (+0530) Subject: regulator: pfuze100: Use of_get_child_by_name X-Git-Tag: rel_imx_3.10.31_1.1.0_alpha~321 X-Git-Url: http://git.agner.ch/gitweb/?a=commitdiff_plain;h=4d286178d55cc5811d50750a44eb729252adef11;p=linux.git regulator: pfuze100: Use of_get_child_by_name of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 21114f7aaced..15059c74cc8e 100644 --- a/drivers/regulator/pfuze100-regulator.c +++ b/drivers/regulator/pfuze100-regulator.c @@ -299,7 +299,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) if (!np) return 0; - parent = of_find_node_by_name(np, "regulators"); + parent = of_get_child_by_name(np, "regulators"); if (!parent) { dev_err(dev, "regulators node not found\n"); return -EINVAL;