Skip to content

Commit

Permalink
regulator: s5m8767: Use of_get_child_by_name
Browse files Browse the repository at this point in the history
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 <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Feb 13, 2014
1 parent 38dbfb5 commit 4e52c03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/s5m8767.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static int s5m8767_pmic_dt_parse_pdata(struct platform_device *pdev,
return -ENODEV;
}

regulators_np = of_find_node_by_name(pmic_np, "regulators");
regulators_np = of_get_child_by_name(pmic_np, "regulators");
if (!regulators_np) {
dev_err(iodev->dev, "could not find regulators sub-node\n");
return -EINVAL;
Expand Down

0 comments on commit 4e52c03

Please sign in to comment.