summaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-03-07 12:45:39 +0000
committerMark Brown <broonie@kernel.org>2022-03-07 13:14:50 +0000
commitf590797fa3c1bccdd19e55441592a23b46aef449 (patch)
treea994089f0ad670a5bd13c4c7dff5dbb8f422eae6 /sound/soc/atmel
parent9a33f5632ca573e512c49fa46cc7131cbc83d4c9 (diff)
downloadlinux-stable-f590797fa3c1bccdd19e55441592a23b46aef449.tar.gz
linux-stable-f590797fa3c1bccdd19e55441592a23b46aef449.tar.bz2
linux-stable-f590797fa3c1bccdd19e55441592a23b46aef449.zip
ASoC: atmel: Add missing of_node_put() in at91sam9g20ek_audio_probe
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. Calling of_node_put() to avoid the refcount leak. Fixes: 531f67e41dcd ("ASoC: at91sam9g20ek-wm8731: convert to dt support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220307124539.1743-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/atmel')
-rw-r--r--sound/soc/atmel/sam9g20_wm8731.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
index 915da92e1ec8..33e43013ff77 100644
--- a/sound/soc/atmel/sam9g20_wm8731.c
+++ b/sound/soc/atmel/sam9g20_wm8731.c
@@ -214,6 +214,7 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0);
if (!cpu_np) {
dev_err(&pdev->dev, "dai and pcm info missing\n");
+ of_node_put(codec_np);
return -EINVAL;
}
at91sam9g20ek_dai.cpus->of_node = cpu_np;