History

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.

Liang He committed 4 years ago

Commit 4becf641 parent c81aba81 file · +1 −0Browse files

Unified · Split

arch/mips/generic/board-ranchu.c+1−0
@@ -44,6 +44,7 @@ static __init unsigned int ranchu_measure_hpt_freq(void) · 43 unmodified lines
4444 __func__);
4545
4646 rtc_base = of_iomap(np, 0);
47+ of_node_put(np);
4748 if (!rtc_base)
4849 panic("%s(): Failed to ioremap Goldfish RTC base!", __func__);
4950