You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
cpufreq: zynq: Fix refcount leak in zynq_get_revision
[ Upstream commitd1ff2559ce] 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:00f7dc6363("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d294d60dc6
commit
22e6d8bcde
@@ -77,6 +77,7 @@ static int __init zynq_get_revision(void)
|
||||
}
|
||||
|
||||
zynq_devcfg_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
if (!zynq_devcfg_base) {
|
||||
pr_err("%s: Unable to map I/O memory\n", __func__);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user