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

Markus Elfring <[email protected]>
Newsgroups org.infradead.lists.linux-amlogic,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound
Message-ID <[email protected]>
…
> > +++ 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

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.