From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: linux-kernel@vger•kernel.org
Cc: Sasha Levin <sashal@kernel•org>,
alsa-devel@alsa-project•org, linuxppc-dev@lists•ozlabs.org,
Timur Tabi <timur@kernel•org>, Xiubo Li <Xiubo.Lee@gmail•com>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
Sascha Hauer <s.hauer@pengutronix•de>,
Takashi Iwai <tiwai@suse•com>,
Liam Girdwood <lgirdwood@gmail•com>,
stable@vger•kernel.org, Jaroslav Kysela <perex@perex•cz>,
Nicolin Chen <nicoleotsuka@gmail•com>,
Mark Brown <broonie@kernel•org>,
NXP Linux Team <linux-imx@nxp•com>,
Pengutronix Kernel Team <kernel@pengutronix•de>,
Wen Yang <yellowriver2010@hotmail•com>,
Shawn Guo <shawnguo@kernel•org>,
Fabio Estevam <festevam@gmail•com>,
linux-arm-kernel@lists•infradead.org
Subject: [PATCH 4.19 083/187] SoC: imx-sgtl5000: add missing put_device()
Date: Thu, 4 Apr 2019 10:47:00 +0200 [thread overview]
Message-ID: <20190404084606.948921343@linuxfoundation.org> (raw)
In-Reply-To: <20190404084603.119654039@linuxfoundation.org>
4.19-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit 8fa857da9744f513036df1c43ab57f338941ae7d ]
The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
Detected by coccinelle with the following warnings:
./sound/soc/fsl/imx-sgtl5000.c:169:1-7: ERROR: missing put_device;
call of_find_device_by_node on line 105, but without a corresponding
object release within this function.
./sound/soc/fsl/imx-sgtl5000.c:177:1-7: ERROR: missing put_device;
call of_find_device_by_node on line 105, but without a corresponding
object release within this function.
Signed-off-by: Wen Yang <yellowriver2010@hotmail•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: Shawn Guo <shawnguo@kernel•org>
Cc: Sascha Hauer <s.hauer@pengutronix•de>
Cc: Pengutronix Kernel Team <kernel@pengutronix•de>
Cc: NXP Linux Team <linux-imx@nxp•com>
Cc: alsa-devel@alsa-project•org
Cc: linuxppc-dev@lists•ozlabs.org
Cc: linux-arm-kernel@lists•infradead.org
Cc: linux-kernel@vger•kernel.org
Signed-off-by: Mark Brown <broonie@kernel•org>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
sound/soc/fsl/imx-sgtl5000.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index c29200cf755a..9b9a7ec52905 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -108,6 +108,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
ret = -EPROBE_DEFER;
goto fail;
}
+ put_device(&ssi_pdev->dev);
codec_dev = of_find_i2c_device_by_node(codec_np);
if (!codec_dev) {
dev_err(&pdev->dev, "failed to find codec platform device\n");
--
2.19.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-04 9:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190404084603.119654039@linuxfoundation.org>
2019-04-04 8:46 ` [PATCH 4.19 049/187] mt76: fix a leaked reference by adding a missing of_node_put Greg Kroah-Hartman
2019-04-04 8:47 ` Greg Kroah-Hartman [this message]
2019-04-04 8:47 ` [PATCH 4.19 124/187] perf/aux: Make perf_event accessible to setup_aux() Greg Kroah-Hartman
2019-04-04 8:48 ` [PATCH 4.19 162/187] cpu/hotplug: Mute hotplug lockdep during init Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404084606.948921343@linuxfoundation.org \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=Xiubo.Lee@gmail$(echo .)com \
--cc=alsa-devel@alsa-project$(echo .)org \
--cc=broonie@kernel$(echo .)org \
--cc=festevam@gmail$(echo .)com \
--cc=kernel@pengutronix$(echo .)de \
--cc=lgirdwood@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-imx@nxp$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=nicoleotsuka@gmail$(echo .)com \
--cc=perex@perex$(echo .)cz \
--cc=s.hauer@pengutronix$(echo .)de \
--cc=sashal@kernel$(echo .)org \
--cc=shawnguo@kernel$(echo .)org \
--cc=stable@vger$(echo .)kernel.org \
--cc=timur@kernel$(echo .)org \
--cc=tiwai@suse$(echo .)com \
--cc=yellowriver2010@hotmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox