Skip to content

Commit

Permalink
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
Browse files Browse the repository at this point in the history
[ Upstream commit 2be84f7 ]

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

Fixes: 08641c7 ("ASoC: mxs: add device tree support for mxs-saif")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yuuoniy authored and gregkh committed Jun 9, 2022
1 parent 8205a01 commit 4e2a1bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/mxs/mxs-saif.c
Expand Up @@ -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
Expand Down

0 comments on commit 4e2a1bc

Please sign in to comment.