Skip to content

Commit 80c469a

Browse files
Wan Jiabingtmlind
authored andcommitted
ARM: OMAP2+: hwmod: Add of_node_put() before break
Fix following coccicheck warning: ./arch/arm/mach-omap2/omap_hwmod.c:753:1-23: WARNING: Function for_each_matching_node should have of_node_put() before break Early exits from for_each_matching_node should decrement the node reference counter. Signed-off-by: Wan Jiabing <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent fa55b7d commit 80c469a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,10 @@ static int __init _init_clkctrl_providers(void)
752752

753753
for_each_matching_node(np, ti_clkctrl_match_table) {
754754
ret = _setup_clkctrl_provider(np);
755-
if (ret)
755+
if (ret) {
756+
of_node_put(np);
756757
break;
758+
}
757759
}
758760

759761
return ret;

0 commit comments

Comments
 (0)