]> www.infradead.org Git - users/dwmw2/linux.git/commit
cpufreq: zynq: Fix refcount leak in zynq_get_revision
authorMiaoqian Lin <linmq006@gmail.com>
Sun, 5 Jun 2022 08:28:07 +0000 (12:28 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:34 +0000 (15:15 +0200)
commit22e6d8bcde8e66b64f46bf9bd2d3d0f88d40c39f
tree9a1a45d51c2ea99fd171e6e6bd237ae1967541ea
parentd294d60dc68550fee0fbbe8a638d798dcd40b2c5
cpufreq: zynq: Fix refcount leak in zynq_get_revision

[ Upstream commit d1ff2559cef0f6f8d97fba6337b28adb10689e16 ]

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: 00f7dc636366 ("ARM: zynq: Add support for SOC_BUS")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220605082807.21526-1-linmq006@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-zynq/common.c