From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Tzung-Bi Shih <tzungbi@google.com>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
matthias.bgg@gmail.com, jiaxin.yu@mediatek.com,
angelogioacchino.delregno@collabora.com,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH AUTOSEL 5.10 31/34] ASoC: mediatek: mt8173: fix device_node leak
Date: Mon, 17 Jan 2022 12:03:21 -0500 [thread overview]
Message-ID: <20220117170326.1471712-31-sashal@kernel.org> (raw)
In-Reply-To: <20220117170326.1471712-1-sashal@kernel.org>
From: Tzung-Bi Shih <tzungbi@google.com>
[ Upstream commit 493433785df0075afc0c106ab65f10a605d0b35d ]
Fixes the device_node leak.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20211224064719.2031210-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/mediatek/mt8173/mt8173-max98090.c | 3 +++
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 ++
sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 ++
sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 ++
4 files changed, 9 insertions(+)
diff --git a/sound/soc/mediatek/mt8173/mt8173-max98090.c b/sound/soc/mediatek/mt8173/mt8173-max98090.c
index fc94314bfc02f..3bdd4931316cd 100644
--- a/sound/soc/mediatek/mt8173/mt8173-max98090.c
+++ b/sound/soc/mediatek/mt8173/mt8173-max98090.c
@@ -180,6 +180,9 @@ static int mt8173_max98090_dev_probe(struct platform_device *pdev)
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
+
+ of_node_put(codec_node);
+ of_node_put(platform_node);
return ret;
}
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
index 0f28dc2217c09..390da5bf727eb 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
@@ -218,6 +218,8 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev)
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
+
+ of_node_put(platform_node);
return ret;
}
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
index 077c6ee067806..c8e4e85e10575 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
@@ -285,6 +285,8 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
+
+ of_node_put(platform_node);
return ret;
}
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c
index c28ebf891cb05..e168d31f44459 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c
@@ -323,6 +323,8 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev)
if (ret)
dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
__func__, ret);
+
+ of_node_put(platform_node);
return ret;
}
--
2.34.1
next prev parent reply other threads:[~2022-01-17 17:11 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 17:02 [PATCH AUTOSEL 5.10 01/34] ALSA: usb-audio: Fix dB level of Bose Revolve+ SoundLink Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 02/34] clk: imx: Use div64_ul instead of do_div Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 03/34] powerpc/6xx: add missing of_node_put Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 04/34] powerpc/powernv: " Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 05/34] powerpc/cell: " Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 06/34] powerpc/btext: " Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 07/34] powerpc/watchdog: Fix missed watchdog reset due to memory ordering race Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 08/34] i2c: i801: Don't silently correct invalid transfer size Sasha Levin
2022-01-17 17:02 ` [PATCH AUTOSEL 5.10 09/34] powerpc/smp: Move setup_profiling_timer() under CONFIG_PROFILING Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 10/34] i2c: mpc: Correct I2C reset procedure Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 11/34] clk: meson: gxbb: Fix the SDM_EN bit for MPLL0 on GXBB Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 12/34] powerpc/powermac: Add missing lockdep_register_key() Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 13/34] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 14/34] KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 15/34] w1: Misuse of get_user()/put_user() reported by sparse Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 16/34] nvmem: core: set size for sysfs bin file Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 17/34] dm: fix alloc_dax error handling in alloc_dev Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 18/34] scsi: lpfc: Trigger SLI4 firmware dump before doing driver cleanup Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 19/34] ALSA: seq: Set upper limit of processed events Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 20/34] MIPS: Loongson64: Use three arguments for slti Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 21/34] powerpc/40x: Map 32Mbytes of memory at startup Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 22/34] selftests/powerpc/spectre_v2: Return skip code when miss_percent is high Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 23/34] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 24/34] powerpc/fadump: Fix inaccurate CPU state info in vmcore generated with panic Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 25/34] udf: Fix error handling in udf_new_inode() Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 26/34] MIPS: OCTEON: add put_device() after of_find_device_by_node() Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 27/34] irqchip/gic-v4: Disable redistributors' view of the VPE table at boot time Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 28/34] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 29/34] MIPS: Octeon: Fix build errors using clang Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 30/34] scsi: sr: Don't use GFP_DMA Sasha Levin
2022-01-17 17:03 ` Sasha Levin [this message]
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 32/34] ASoC: mediatek: mt8183: fix device_node leak Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 33/34] phy: mediatek: Fix missing check in mtk_mipi_tx_probe Sasha Levin
2022-01-17 17:03 ` [PATCH AUTOSEL 5.10 34/34] leds: leds-fsg: Drop FSG3 LED driver Sasha Levin
2022-01-17 23:09 ` Pavel Machek
2022-01-22 18:45 ` Sasha Levin
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=20220117170326.1471712-31-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=jiaxin.yu@mediatek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=tzungbi@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).