[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220628022518.596687-13-sashal@kernel.org>
Date: Mon, 27 Jun 2022 22:25:08 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Liang He <windhl@....com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Sasha Levin <sashal@...nel.org>, miodrag.dinic@...s.com,
paulburton@...nel.org, linux-mips@...r.kernel.org
Subject: [PATCH AUTOSEL 4.19 13/22] arch: mips: generic: Add missing of_node_put() in board-ranchu.c
From: Liang He <windhl@....com>
[ Upstream commit 4becf6417bbdc293734a590fe4ed38437bbcea2c ]
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@....com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/mips/generic/board-ranchu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/generic/board-ranchu.c b/arch/mips/generic/board-ranchu.c
index 59a8c18fa2cc..019c5888efd2 100644
--- a/arch/mips/generic/board-ranchu.c
+++ b/arch/mips/generic/board-ranchu.c
@@ -48,6 +48,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__);
--
2.35.1
Powered by blists - more mailing lists