clk: s2mps11: Use of_get_child_by_name
of_find_node_by_name() walks over all nodes and can thus walk outside of the parent node. Use of_get_child_by_name() instead. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mike Turquette <mturquette@linaro.org>
This commit is contained in:
parent
238e14055d
commit
afbd1a0c30
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev)
|
|||
if (!iodev->dev->of_node)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
clk_np = of_find_node_by_name(iodev->dev->of_node, "clocks");
|
||||
clk_np = of_get_child_by_name(iodev->dev->of_node, "clocks");
|
||||
if (!clk_np) {
|
||||
dev_err(&pdev->dev, "could not find clock sub-node\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
|
Loading…
Reference in a new issue