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

ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

stable inclusion
from stable-v5.10.121
commit 2a0da7641e1f17a744ac7b3f76471388c97b63dc
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

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

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

[ Upstream commit 2be84f73 ]

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.

Fixes: 08641c7c ("ASoC: mxs: add device tree support for mxs-saif")
Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 0635eb9f
...@@ -764,6 +764,7 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -764,6 +764,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
saif->master_id = saif->id; saif->master_id = saif->id;
} else { } else {
ret = of_alias_get_id(master, "saif"); ret = of_alias_get_id(master, "saif");
of_node_put(master);
if (ret < 0) if (ret < 0)
return ret; return ret;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册