Skip to content

Commit 173940b

Browse files
windhljcmvbkbc
authored andcommitted
xtensa: xtfpga: Fix refcount leak bug in setup
In machine_setup(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Cc: [email protected] Signed-off-by: Liang He <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent a0117dc commit 173940b

File tree

1 file changed

+1
-0
lines changed
  • arch/xtensa/platforms/xtfpga

1 file changed

+1
-0
lines changed

arch/xtensa/platforms/xtfpga/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static int __init machine_setup(void)
133133

134134
if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
135135
update_local_mac(eth);
136+
of_node_put(eth);
136137
return 0;
137138
}
138139
arch_initcall(machine_setup);

0 commit comments

Comments
 (0)