[PATCH] ASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe()
Mark Brown
broonie at kernel.org
Wed Apr 1 05:53:13 PDT 2026
On Wed, Apr 01, 2026 at 01:30:51PM +0800, Haoxiang Li wrote:
> Call mxs_saif_put_mclk() to disable MCLK on error
> paths of mxs_sgtl5000_probe().
> ret = devm_snd_soc_register_card(&pdev->dev, card);
> - if (ret)
> + if (ret) {
> + mxs_saif_put_mclk(0);
> return dev_err_probe(&pdev->dev, ret, "snd_soc_register_card failed\n");
> + }
This fixes the leak here, however it does highlight that there's a
preexisting issue on remove where we disable the MCLK in remove() but
due to the use of devm_ above we're only unregistering the card after
that has returned.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260401/a4d27693/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list