From 4fa43a4a6f8d1b7a8f32e7ba654f36ef86ab1e56 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 14 Feb 2014 17:19:48 +0530 Subject: regulator: max77693: 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/max77693.c b/drivers/regulator/max77693.c index 5fb899f..057d040 100644 --- a/drivers/regulator/max77693.c +++ b/drivers/regulator/max77693.c @@ -170,7 +170,7 @@ static int max77693_pmic_dt_parse_rdata(struct device *dev, struct max77693_regulator_data *tmp; int i, matched = 0; - np = of_find_node_by_name(dev->parent->of_node, "regulators"); + np = of_get_child_by_name(dev->parent->of_node, "regulators"); if (!np) return -EINVAL; -- cgit v0.10.2