arch: mips: generic: Add missing of_node_put() in board-ranchu.c
authorLiang He <windhl@126.com>
Wed, 15 Jun 2022 14:11:23 +0000 (22:11 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 21 Jun 2022 15:04:30 +0000 (17:04 +0200)
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 <windhl@126.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/generic/board-ranchu.c

index a89aaad..930c450 100644 (file)
@@ -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__);