diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-05-11 16:37:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-09 11:21:07 +0300 |
commit | 2a0da7641e1f17a744ac7b3f76471388c97b63dc (patch) | |
tree | b640a35fabe61e0bc327846ab5d7b65458182af3 /sound/soc | |
parent | e84aaf23ca82753d765bf84d05295d9d9c5fed29 (diff) | |
download | linux-2a0da7641e1f17a744ac7b3f76471388c97b63dc.tar.xz |
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
[ Upstream commit 2be84f73785fa9ed6443e3c5b158730266f1c2ee ]
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Fixes: 08641c7c74dd ("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>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/mxs/mxs-saif.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index f2eda81985e2..d87ac26999cf 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -764,6 +764,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 |