[lkml]   [2019]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectApplied "ASoC: samsung: odroid: fix a double-free issue for cpu_dai" to the asoc tree
The patch

ASoC: samsung: odroid: fix a double-free issue for cpu_dai

has been applied to the asoc tree at for-5.3

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.


From 2abee12c0ab1924a69993d2c063a39a952e7d836 Mon Sep 17 00:00:00 2001
From: Wen Yang <>
Date: Sat, 13 Jul 2019 11:46:15 +0800
Subject: [PATCH] ASoC: samsung: odroid: fix a double-free issue for cpu_dai

The cpu_dai variable is still being used after the of_node_put() call,
which may result in double-free:

of_node_put(cpu_dai); ---> released here

ret = devm_snd_soc_register_card(dev, card);
if (ret < 0) {
goto err_put_clk_i2s; --> jump to err_put_clk_i2s

of_node_put(cpu_dai); --> double-free here

Fixes: d832d2b246c5 ("ASoC: samsung: odroid: Fix of_node refcount unbalance")
Signed-off-by: Wen Yang <>
Cc: Krzysztof Kozlowski <>
Cc: Sangbeom Kim <>
Cc: Sylwester Nawrocki <>
Cc: Liam Girdwood <>
Cc: Mark Brown <>
Cc: Jaroslav Kysela <>
Cc: Takashi Iwai <>
Signed-off-by: Mark Brown <>
sound/soc/samsung/odroid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c
index 64ebe895cdd7..f0f5fa9c27d3 100644
--- a/sound/soc/samsung/odroid.c
+++ b/sound/soc/samsung/odroid.c
@@ -308,7 +308,6 @@ static int odroid_audio_probe(struct platform_device *pdev)
ret = PTR_ERR(priv->clk_i2s_bus);
goto err_put_sclk;
- of_node_put(cpu_dai);

ret = devm_snd_soc_register_card(dev, card);
if (ret < 0) {
@@ -316,6 +315,7 @@ static int odroid_audio_probe(struct platform_device *pdev)
goto err_put_clk_i2s;

+ of_node_put(cpu_dai);
return 0;

 \ /
  Last update: 2019-07-16 20:18    [W:0.077 / U:14.228 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site