diff options
author | Liang He <windhl@126.com> | 2022-06-17 13:53:23 +0200 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-06-18 23:47:41 +0200 |
commit | 173940b3ae40114d4179c251a98ee039dc9cd5b3 (patch) | |
tree | dae5ff169192eeea53d34a23218af4d22c90f399 /arch/xtensa | |
parent | xtensa: Fix refcount leak bug in time.c (diff) | |
download | linux-173940b3ae40114d4179c251a98ee039dc9cd5b3.tar.xz linux-173940b3ae40114d4179c251a98ee039dc9cd5b3.zip |
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: 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>
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/platforms/xtfpga/setup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c index 538e6748e85a..c79c1d09ea86 100644 --- a/arch/xtensa/platforms/xtfpga/setup.c +++ b/arch/xtensa/platforms/xtfpga/setup.c @@ -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); |