]>
Commit | Line | Data |
---|---|---|
f688f459 SL |
1 | From bd9a8a4ded356f4052387792c0b551e3218f4ba9 Mon Sep 17 00:00:00 2001 |
2 | From: wen yang <yellowriver2010@hotmail.com> | |
3 | Date: Sat, 2 Feb 2019 14:53:16 +0000 | |
4 | Subject: ASoC: fsl-asoc-card: fix object reference leaks in | |
5 | fsl_asoc_card_probe | |
6 | ||
7 | [ Upstream commit 11907e9d3533648615db08140e3045b829d2c141 ] | |
8 | ||
9 | The of_find_device_by_node() takes a reference to the underlying device | |
10 | structure, we should release that reference. | |
11 | ||
12 | Signed-off-by: Wen Yang <yellowriver2010@hotmil.com> | |
13 | Cc: Timur Tabi <timur@kernel.org> | |
14 | Cc: Nicolin Chen <nicoleotsuka@gmail.com> | |
15 | Cc: Xiubo Li <Xiubo.Lee@gmail.com> | |
16 | Cc: Fabio Estevam <festevam@gmail.com> | |
17 | Cc: Liam Girdwood <lgirdwood@gmail.com> | |
18 | Cc: Mark Brown <broonie@kernel.org> | |
19 | Cc: Jaroslav Kysela <perex@perex.cz> | |
20 | Cc: Takashi Iwai <tiwai@suse.com> | |
21 | Cc: alsa-devel@alsa-project.org | |
22 | Cc: linuxppc-dev@lists.ozlabs.org | |
23 | Cc: linux-kernel@vger.kernel.org | |
24 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
25 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
26 | --- | |
27 | sound/soc/fsl/fsl-asoc-card.c | 1 + | |
28 | 1 file changed, 1 insertion(+) | |
29 | ||
30 | diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c | |
31 | index 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 | -- | |
43 | 2.19.1 | |
44 |