]>
Commit | Line | Data |
---|---|---|
1143c684 SL |
1 | From d3cc660362f8816e1b59a7b1063b915250f6a051 Mon Sep 17 00:00:00 2001 |
2 | From: Wen Yang <wen.yang99@zte.com.cn> | |
3 | Date: Tue, 26 Feb 2019 16:17:51 +0800 | |
4 | Subject: ASoC: eukrea-tlv320: fix a leaked reference by adding missing | |
5 | of_node_put | |
6 | ||
7 | [ Upstream commit b820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 ] | |
8 | ||
9 | The call to of_parse_phandle returns a node pointer with refcount | |
10 | incremented thus it must be explicitly decremented after the last | |
11 | usage. | |
12 | ||
13 | Detected by coccinelle with the following warnings: | |
14 | ./sound/soc/fsl/eukrea-tlv320.c:121:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo nding object release within this function. | |
15 | ./sound/soc/fsl/eukrea-tlv320.c:127:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 102, but without a correspo nding object release within this function. | |
16 | ||
17 | Signed-off-by: Wen Yang <wen.yang99@zte.com.cn> | |
18 | Cc: Liam Girdwood <lgirdwood@gmail.com> | |
19 | Cc: Mark Brown <broonie@kernel.org> | |
20 | Cc: Jaroslav Kysela <perex@perex.cz> | |
21 | Cc: Takashi Iwai <tiwai@suse.com> | |
22 | Cc: alsa-devel@alsa-project.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/eukrea-tlv320.c | 4 ++-- | |
28 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
29 | ||
30 | diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c | |
31 | index 883087f2b092b..38132143b7d5e 100644 | |
32 | --- a/sound/soc/fsl/eukrea-tlv320.c | |
33 | +++ b/sound/soc/fsl/eukrea-tlv320.c | |
34 | @@ -119,13 +119,13 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) | |
35 | if (ret) { | |
36 | dev_err(&pdev->dev, | |
37 | "fsl,mux-int-port node missing or invalid.\n"); | |
38 | - return ret; | |
39 | + goto err; | |
40 | } | |
41 | ret = of_property_read_u32(np, "fsl,mux-ext-port", &ext_port); | |
42 | if (ret) { | |
43 | dev_err(&pdev->dev, | |
44 | "fsl,mux-ext-port node missing or invalid.\n"); | |
45 | - return ret; | |
46 | + goto err; | |
47 | } | |
48 | ||
49 | /* | |
50 | -- | |
51 | 2.20.1 | |
52 |