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

Configure Feed

Select the types of activity you want to include in your feed.

clk: versatile: impd1: Simplify with scoped for each OF child loop

Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Stephen Boyd
faee3e39 9925fda8

+2 -5
+2 -5
drivers/clk/versatile/clk-impd1.c
··· 104 104 { 105 105 struct device *dev = &pdev->dev; 106 106 struct device_node *np = dev->of_node; 107 - struct device_node *child; 108 107 int ret = 0; 109 108 110 - for_each_available_child_of_node(np, child) { 109 + for_each_available_child_of_node_scoped(np, child) { 111 110 ret = integrator_impd1_clk_spawn(dev, np, child); 112 - if (ret) { 113 - of_node_put(child); 111 + if (ret) 114 112 break; 115 - } 116 113 } 117 114 118 115 return ret;