提交 bb915c93 编写于 作者: M Miaoqian Lin 提交者: Zheng Zengkai

ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init

stable inclusion
from stable-v5.10.137
commit d294d60dc68550fee0fbbe8a638d798dcd40b2c5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d294d60dc68550fee0fbbe8a638d798dcd40b2c5

--------------------------------

[ Upstream commit 942228fb ]

of_find_matching_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 1e037794 ("ARM: OMAP3+: PRM: register interrupt information from DT")
Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
Message-Id: <20220526073724.21169-1-linmq006@gmail.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 95d4d58d
......@@ -708,6 +708,7 @@ static int omap3xxx_prm_late_init(void)
}
irq_num = of_irq_get(np, 0);
of_node_put(np);
if (irq_num == -EPROBE_DEFER)
return irq_num;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册