* [PATCH] ASoC: mt6359: Fix refcount leak bug
@ 2022-07-13 10:20 Liang He
2022-07-13 14:30 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Liang He @ 2022-07-13 10:20 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai, matthias.bgg, windhl,
alsa-devel
In mt6359_parse_dt() and mt6359_accdet_parse_dt(), we should call
of_node_put() for the reference returned by of_get_child_by_name()
which has increased the refcount.
Fixes: 683530285316 ("ASoC: mt6359: fix failed to parse DT properties")
Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver")
Signed-off-by: Liang He <windhl@126.com>
---
sound/soc/codecs/mt6359-accdet.c | 1 +
sound/soc/codecs/mt6359.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/sound/soc/codecs/mt6359-accdet.c b/sound/soc/codecs/mt6359-accdet.c
index 6d3d170144a0..c190628e2905 100644
--- a/sound/soc/codecs/mt6359-accdet.c
+++ b/sound/soc/codecs/mt6359-accdet.c
@@ -675,6 +675,7 @@ static int mt6359_accdet_parse_dt(struct mt6359_accdet *priv)
sizeof(struct three_key_threshold));
}
+ of_node_put(node);
dev_warn(priv->dev, "accdet caps=%x\n", priv->caps);
return 0;
diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c
index 23709b180409..c9a453ce8a2a 100644
--- a/sound/soc/codecs/mt6359.c
+++ b/sound/soc/codecs/mt6359.c
@@ -2778,6 +2778,7 @@ static int mt6359_parse_dt(struct mt6359_priv *priv)
ret = of_property_read_u32(np, "mediatek,mic-type-2",
&priv->mux_select[MUX_MIC_TYPE_2]);
+ of_node_put(np);
if (ret) {
dev_info(priv->dev,
"%s() failed to read mic-type-2, use default (%d)\n",
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: mt6359: Fix refcount leak bug
2022-07-13 10:20 [PATCH] ASoC: mt6359: Fix refcount leak bug Liang He
@ 2022-07-13 14:30 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-07-13 14:30 UTC (permalink / raw)
To: perex, windhl, lgirdwood, tiwai, alsa-devel, matthias.bgg
On Wed, 13 Jul 2022 18:20:13 +0800, Liang He wrote:
> In mt6359_parse_dt() and mt6359_accdet_parse_dt(), we should call
> of_node_put() for the reference returned by of_get_child_by_name()
> which has increased the refcount.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: mt6359: Fix refcount leak bug
commit: a8d5df69e2ec702d979f7d04ed519caf8691a032
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-07-13 14:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 10:20 [PATCH] ASoC: mt6359: Fix refcount leak bug Liang He
2022-07-13 14:30 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.