From: Liang He Date: Wed, 15 Jun 2022 14:11:23 +0000 (+0800) Subject: arch: mips: generic: Add missing of_node_put() in board-ranchu.c X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4becf6417bbdc293734a590fe4ed38437bbcea2c;p=linux.git arch: mips: generic: Add missing of_node_put() in board-ranchu.c In ranchu_measure_hpt_freq(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_put_node() when it is not used anymore. Signed-off-by: Liang He Signed-off-by: Thomas Bogendoerfer --- diff --git a/arch/mips/generic/board-ranchu.c b/arch/mips/generic/board-ranchu.c index a89aaad59cb18..930c450418822 100644 --- a/arch/mips/generic/board-ranchu.c +++ b/arch/mips/generic/board-ranchu.c @@ -44,6 +44,7 @@ static __init unsigned int ranchu_measure_hpt_freq(void) __func__); rtc_base = of_iomap(np, 0); + of_node_put(np); if (!rtc_base) panic("%s(): Failed to ioremap Goldfish RTC base!", __func__);