* [PATCH] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data
@ 2022-03-16 8:36 Miaoqian Lin
2022-03-16 20:35 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-03-16 8:36 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Pierre-Louis Bossart, alsa-devel,
linux-kernel
Cc: linmq006
The device_node pointer is returned by of_parse_phandle() with refcount
incremented. We should use of_node_put() on it when done.
This is similar to commit 64b92de9603f
("ASoC: wcd9335: fix a leaked reference by adding missing of_node_put")
Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
sound/soc/codecs/wcd934x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index 6c468527fec6..acd344c4a37a 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -5883,6 +5883,7 @@ static int wcd934x_codec_parse_data(struct wcd934x_codec *wcd)
}
wcd->sidev = of_slim_get_device(wcd->sdev->ctrl, ifc_dev_np);
+ of_node_put(ifc_dev_np);
if (!wcd->sidev) {
dev_err(dev, "Unable to get SLIM Interface device\n");
return -EINVAL;
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data
2022-03-16 8:36 [PATCH] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data Miaoqian Lin
@ 2022-03-16 20:35 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-03-16 20:35 UTC (permalink / raw)
To: alsa-devel, Jaroslav Kysela, Miaoqian Lin, Banajit Goswami,
linux-kernel, Liam Girdwood, Srinivas Kandagatla, Takashi Iwai,
Pierre-Louis Bossart
On Wed, 16 Mar 2022 08:36:31 +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
> This is similar to commit 64b92de9603f
> ("ASoC: wcd9335: fix a leaked reference by adding missing of_node_put")
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data
commit: 9531a631379169d57756b2411178c6238655df88
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-16 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 8:36 [PATCH] ASoC: codecs: wcd934x: Add missing of_node_put() in wcd934x_codec_parse_data Miaoqian Lin
2022-03-16 20:35 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®