From: Axel Lin Date: Thu, 5 Jun 2014 00:43:59 +0000 (+0800) Subject: regulator: ltc3589: Use of_get_child_by_name X-Git-Tag: MMI-PSA29.97-13-9~12041^2^3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73d23ca732edf07ce2b62668821247bf1a636b54;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git regulator: ltc3589: 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: Axel Lin Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 110a99ee1162..c8105182b8b8 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc3589.c @@ -255,7 +255,7 @@ static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589) struct device_node *node; int i, ret; - node = of_find_node_by_name(dev->of_node, "regulators"); + node = of_get_child_by_name(dev->of_node, "regulators"); if (!node) { dev_err(dev, "regulators node not found\n"); return -EINVAL;