Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Krzysztof Kozlowski and committed by
Mike Turquette
afbd1a0c 238e1405

+1 -1
+1 -1
drivers/clk/clk-s2mps11.c
··· 134 134 if (!iodev->dev->of_node) 135 135 return ERR_PTR(-EINVAL); 136 136 137 - clk_np = of_find_node_by_name(iodev->dev->of_node, "clocks"); 137 + clk_np = of_get_child_by_name(iodev->dev->of_node, "clocks"); 138 138 if (!clk_np) { 139 139 dev_err(&pdev->dev, "could not find clock sub-node\n"); 140 140 return ERR_PTR(-EINVAL);