From: Valerio Setti <vsetti@baylibre.com>
To: Markus Elfring <Markus.Elfring@web.de>,
Ethan Tidmore <ethantidmore06@gmail.com>,
linux-sound@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jaroslav Kysela <perex@perex.cz>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH] ASoC: meson: aiu: Fix resource leak
Date: Fri, 10 Jul 2026 14:47:34 +0200 [thread overview]
Message-ID: <191ee2b4-d552-49ab-aebb-58da970087a1@baylibre.com> (raw)
In-Reply-To: <76386ed2-b7dc-441a-b9ea-80ab26c54d52@web.de>
On 7/10/26 1:27 PM, Markus Elfring wrote:
> …
>>> +++ b/sound/soc/meson/aiu.c
>>> @@ -310,7 +310,7 @@ static int aiu_probe(struct platform_device *pdev)
>>> ARRAY_SIZE(aiu_cpu_dai_drv));
>>> if (ret) {
>>> dev_err(dev, "Failed to register cpu component\n");
>>> - return ret;
>>> + goto err;
>>> }
>>>
>>> /* Register the hdmi codec control component */
>>
>> Technically the fix is OK, …
>
> I doubt it.
>
> How can a snd_soc_unregister_component(dev) call ever fit to a failed
> snd_soc_register_component() call (according to the presented suggestion)?
> https://elixir.bootlin.com/linux/v7.2-rc1/source/sound/soc/meson/aiu.c#L240-L315
The reply was based on the fact that looking at
'snd_soc_unregister_component' that's a macro for
'snd_soc_unregister_component_by_driver'. The latter cycles through all
registered components and if nothing is found related to the given dev,
then it results in a no-op.
So calling 'snd_soc_unregister_component' on a failed
'snd_soc_register_component' looked harmless to me.
What did I miss?
--
Valerio
prev parent reply other threads:[~2026-07-10 12:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 1:24 [PATCH] ASoC: meson: aiu: Fix resource leak Ethan Tidmore
2026-07-07 20:33 ` Valerio Setti
2026-07-10 11:27 ` Markus Elfring
2026-07-10 12:47 ` Valerio Setti [this message]
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=191ee2b4-d552-49ab-aebb-58da970087a1@baylibre.com \
--to=vsetti@baylibre.com \
--cc=Markus.Elfring@web.de \
--cc=broonie@kernel.org \
--cc=ethantidmore06@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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