Commit 2be84f73 authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Mark Brown

ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe

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: default avatarMiaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a9fa954
......@@ -754,6 +754,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
saif->master_id = saif->id;
} else {
ret = of_alias_get_id(master, "saif");
of_node_put(master);
if (ret < 0)
return ret;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment