Commit dab15a96 authored by wen yang's avatar wen yang Committed by Stefan Bader

ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe

BugLink: https://bugs.launchpad.net/bugs/1828420

[ Upstream commit 11907e9d ]

The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
Signed-off-by: default avatarWen Yang <yellowriver2010@hotmil.com>
Cc: Timur Tabi <timur@kernel.org>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent dcc993e3
...@@ -659,6 +659,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) ...@@ -659,6 +659,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
asrc_fail: asrc_fail:
of_node_put(asrc_np); of_node_put(asrc_np);
of_node_put(codec_np); of_node_put(codec_np);
put_device(&cpu_pdev->dev);
fail: fail:
of_node_put(cpu_np); of_node_put(cpu_np);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment