From: Liang He Date: Tue, 28 Jun 2022 11:29:39 +0000 (+0800) Subject: ARM: OMAP2+: omap4-common: Fix refcount leak bug X-Git-Tag: io_uring-6.3-2023-03-03~55^2~8^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7c32919a378782c95c72bc028b5c30dfe8c11f82;p=linux-block.git ARM: OMAP2+: omap4-common: Fix refcount leak bug In omap4_sram_init(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: Liang He Message-Id: <20220628112939.160737-1-windhl@126.com> Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 6d1eb4eefefe..d9ed2a5dcd5e 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -140,6 +140,7 @@ static int __init omap4_sram_init(void) __func__); else sram_sync = (void __iomem *)gen_pool_alloc(sram_pool, PAGE_SIZE); + of_node_put(np); return 0; }