[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220621151438.GB12206@alpha.franken.de>
Date: Tue, 21 Jun 2022 17:14:38 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Liang He <windhl@....com>
Cc: miodrag.dinic@...s.com, paulburton@...nel.org,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arch: mips: generic: Add missing of_node_put() in
board-ranchu.c
On Wed, Jun 15, 2022 at 10:11:23PM +0800, Liang He wrote:
> 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>
> ---
> 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 a89aaad59cb1..930c45041882 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__);
>
> --
> 2.25.1
applied to mips-fixes.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists