diff options
author | Liang He <windhl@126.com> | 2022-06-19 12:54:27 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2022-06-21 17:04:54 +0200 |
commit | eb9e9bc4fa5fb489c92ec588b3fb35f042ba6d86 (patch) | |
tree | 92d4b7a7356fd6c5402c90e27d1785a7d8f1090c /arch/mips/pic32/pic32mzda/time.c | |
parent | mips: lantiq: xway: Fix refcount leak bug in sysctrl (diff) | |
download | wireguard-linux-eb9e9bc4fa5fb489c92ec588b3fb35f042ba6d86.tar.xz wireguard-linux-eb9e9bc4fa5fb489c92ec588b3fb35f042ba6d86.zip |
mips/pic32/pic32mzda: Fix refcount leak bugs
of_find_matching_node(), of_find_compatible_node() and
of_find_node_by_path() will return node pointers with refcout
incremented. We should call of_node_put() when they are not
used anymore.
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/pic32/pic32mzda/time.c')
-rw-r--r-- | arch/mips/pic32/pic32mzda/time.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/pic32/pic32mzda/time.c b/arch/mips/pic32/pic32mzda/time.c index 7174e9abbb1b..777b515c52c8 100644 --- a/arch/mips/pic32/pic32mzda/time.c +++ b/arch/mips/pic32/pic32mzda/time.c @@ -32,6 +32,9 @@ static unsigned int pic32_xlate_core_timer_irq(void) goto default_map; irq = irq_of_parse_and_map(node, 0); + + of_node_put(node); + if (!irq) goto default_map; |