diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-03-09 10:43:01 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-12 12:14:55 +0200 |
commit | debae99ad138e5fcd306ac583e8ca2214486a99b (patch) | |
tree | 6e46a724cd3940eb15561a50d25f4f31228f8f8c | |
parent | c6281ad2d69ffe4ca36f5c174b7e92b2f9d37e9d (diff) | |
download | linux-stable-debae99ad138e5fcd306ac583e8ca2214486a99b.tar.gz linux-stable-debae99ad138e5fcd306ac583e8ca2214486a99b.tar.bz2 linux-stable-debae99ad138e5fcd306ac583e8ca2214486a99b.zip |
ARM: OMAP2+: Fix refcount leak in omap_gic_of_init
[ Upstream commit 0f83e6b4161617014017a694888dd8743f46f071 ]
The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.
Fixes: fd1c07861491 ("ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Message-Id: <20220309104302.18398-1-linmq006@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index e5dcbda20129..7fff67ea7bcd 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -342,10 +342,12 @@ void __init omap_gic_of_init(void) np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic"); gic_dist_base_addr = of_iomap(np, 0); + of_node_put(np); WARN_ON(!gic_dist_base_addr); np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer"); twd_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!twd_base); skip_errata_init: |