From: Miaoqian Lin Date: Wed, 11 May 2022 13:37:22 +0000 (+0400) Subject: ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d42601e93fce7802bb8d70dd59b60cfeefa20469;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 93c019670199..6d0ab4e75518 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -780,6 +780,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