mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
xtensa: xtfpga: Fix refcount leak bug in setup
commit 173940b3ae
upstream.
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: stable@vger.kernel.org
Signed-off-by: Liang He <windhl@126.com>
Message-Id: <20220617115323.4046905-1-windhl@126.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1ca352761f
commit
cdeeb4fb2f
1 changed files with 1 additions and 0 deletions
|
@ -133,6 +133,7 @@ static int __init machine_setup(void)
|
|||
|
||||
if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
|
||||
update_local_mac(eth);
|
||||
of_node_put(eth);
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(machine_setup);
|
||||
|
|
Loading…
Add table
Reference in a new issue