]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.7/asoc-fsl-asoc-card-fix-object-reference-leaks-in-fsl.patch
Linux 5.0.7
[thirdparty/kernel/stable-queue.git] / releases / 5.0.7 / asoc-fsl-asoc-card-fix-object-reference-leaks-in-fsl.patch
CommitLineData
f688f459
SL
1From bd9a8a4ded356f4052387792c0b551e3218f4ba9 Mon Sep 17 00:00:00 2001
2From: wen yang <yellowriver2010@hotmail.com>
3Date: Sat, 2 Feb 2019 14:53:16 +0000
4Subject: ASoC: fsl-asoc-card: fix object reference leaks in
5 fsl_asoc_card_probe
6
7[ Upstream commit 11907e9d3533648615db08140e3045b829d2c141 ]
8
9The of_find_device_by_node() takes a reference to the underlying device
10structure, we should release that reference.
11
12Signed-off-by: Wen Yang <yellowriver2010@hotmil.com>
13Cc: Timur Tabi <timur@kernel.org>
14Cc: Nicolin Chen <nicoleotsuka@gmail.com>
15Cc: Xiubo Li <Xiubo.Lee@gmail.com>
16Cc: Fabio Estevam <festevam@gmail.com>
17Cc: Liam Girdwood <lgirdwood@gmail.com>
18Cc: Mark Brown <broonie@kernel.org>
19Cc: Jaroslav Kysela <perex@perex.cz>
20Cc: Takashi Iwai <tiwai@suse.com>
21Cc: alsa-devel@alsa-project.org
22Cc: linuxppc-dev@lists.ozlabs.org
23Cc: linux-kernel@vger.kernel.org
24Signed-off-by: Mark Brown <broonie@kernel.org>
25Signed-off-by: Sasha Levin <sashal@kernel.org>
26---
27 sound/soc/fsl/fsl-asoc-card.c | 1 +
28 1 file changed, 1 insertion(+)
29
30diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
31index 81f2fe2c6d23..60f87a0d99f4 100644
32--- a/sound/soc/fsl/fsl-asoc-card.c
33+++ b/sound/soc/fsl/fsl-asoc-card.c
34@@ -689,6 +689,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
35 asrc_fail:
36 of_node_put(asrc_np);
37 of_node_put(codec_np);
38+ put_device(&cpu_pdev->dev);
39 fail:
40 of_node_put(cpu_np);
41
42--
432.19.1
44