ARM: meson: Fix refcount leak in meson_smp_prepare_cpus
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 02:16:10 +0000 (06:16 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:11 +0000 (16:35 +0200)
commit7208101ded1e9dcc52c8f0f8b16474211c871c1a
treee6d077a75ab033610838b2c0fafccd37eb6b54aa
parent9c26be2c3e699ad4925d4bdf944be669643a619c
ARM: meson: Fix refcount leak in meson_smp_prepare_cpus

[ Upstream commit 34d2cd3fccced12b958b8848e3eff0ee4296764c ]

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: d850f3e5d296 ("ARM: meson: Add SMP bringup code for Meson8 and Meson8b")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220512021611.47921-1-linmq006@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-meson/platsmp.c