mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
ASoC: atmel: Add missing of_node_put() in at91sam9g20ek_audio_probe
[ Upstream commitf590797fa3
] 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:531f67e41d
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
03054f22d5
commit
f8b7b9a059
1 changed files with 1 additions and 0 deletions
|
@ -226,6 +226,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.cpu_of_node = cpu_np;
|
||||
|
|
Loading…
Reference in a new issue