Re: [PATCH] ASoC: meson: aiu: Fix resource leak

From: Markus Elfring

Date: Fri Jul 10 2026 - 07:28:15 EST



> > +++ 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

Regards,
Markus