Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afbd1a0c authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mike Turquette
Browse files

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: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 238e1405
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);