]>
Commit | Line | Data |
---|---|---|
91861a69 SL |
1 | From 00b9ce18066894bdaf0cd896ad2553377082aee5 Mon Sep 17 00:00:00 2001 |
2 | From: Wen Yang <yellowriver2010@hotmail.com> | |
3 | Date: Mon, 18 Feb 2019 15:13:47 +0000 | |
4 | Subject: SoC: imx-sgtl5000: add missing put_device() | |
5 | ||
6 | [ Upstream commit 8fa857da9744f513036df1c43ab57f338941ae7d ] | |
7 | ||
8 | The of_find_device_by_node() takes a reference to the underlying device | |
9 | structure, we should release that reference. | |
10 | ||
11 | Detected by coccinelle with the following warnings: | |
12 | ./sound/soc/fsl/imx-sgtl5000.c:169:1-7: ERROR: missing put_device; | |
13 | call of_find_device_by_node on line 105, but without a corresponding | |
14 | object release within this function. | |
15 | ./sound/soc/fsl/imx-sgtl5000.c:177:1-7: ERROR: missing put_device; | |
16 | call of_find_device_by_node on line 105, but without a corresponding | |
17 | object release within this function. | |
18 | ||
19 | Signed-off-by: Wen Yang <yellowriver2010@hotmail.com> | |
20 | Cc: Timur Tabi <timur@kernel.org> | |
21 | Cc: Nicolin Chen <nicoleotsuka@gmail.com> | |
22 | Cc: Xiubo Li <Xiubo.Lee@gmail.com> | |
23 | Cc: Fabio Estevam <festevam@gmail.com> | |
24 | Cc: Liam Girdwood <lgirdwood@gmail.com> | |
25 | Cc: Mark Brown <broonie@kernel.org> | |
26 | Cc: Jaroslav Kysela <perex@perex.cz> | |
27 | Cc: Takashi Iwai <tiwai@suse.com> | |
28 | Cc: Shawn Guo <shawnguo@kernel.org> | |
29 | Cc: Sascha Hauer <s.hauer@pengutronix.de> | |
30 | Cc: Pengutronix Kernel Team <kernel@pengutronix.de> | |
31 | Cc: NXP Linux Team <linux-imx@nxp.com> | |
32 | Cc: alsa-devel@alsa-project.org | |
33 | Cc: linuxppc-dev@lists.ozlabs.org | |
34 | Cc: linux-arm-kernel@lists.infradead.org | |
35 | Cc: linux-kernel@vger.kernel.org | |
36 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
37 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
38 | --- | |
39 | sound/soc/fsl/imx-sgtl5000.c | 1 + | |
40 | 1 file changed, 1 insertion(+) | |
41 | ||
42 | diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c | |
43 | index b99e0b5e00e9..8e525f7ac08d 100644 | |
44 | --- a/sound/soc/fsl/imx-sgtl5000.c | |
45 | +++ b/sound/soc/fsl/imx-sgtl5000.c | |
46 | @@ -115,6 +115,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) | |
47 | ret = -EPROBE_DEFER; | |
48 | goto fail; | |
49 | } | |
50 | + put_device(&ssi_pdev->dev); | |
51 | codec_dev = of_find_i2c_device_by_node(codec_np); | |
52 | if (!codec_dev) { | |
53 | dev_err(&pdev->dev, "failed to find codec platform device\n"); | |
54 | -- | |
55 | 2.19.1 | |
56 |