mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 17:42:03 +02:00
ASoC: fsl: mpc5200-i2s: Free DMA resources on probe failure
mpc5200_audio_dma_create() creates the DMA resources before registering
the component. If snd_soc_register_component() fails, the function
returns directly and leaves the DMA resources allocated.
Call mpc5200_audio_dma_destroy() before returning from this error path.
Fixes: f515b67381 ("ASoC: fsl: mpc5200 combine psc_dma platform data")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Link: https://patch.msgid.link/20260622094822.926166-1-haoxiang_li2024@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
612ccf42ac
commit
3a89ddcf0c
|
|
@ -170,6 +170,7 @@ static int psc_i2s_of_probe(struct platform_device *op)
|
|||
psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai));
|
||||
if (rc != 0) {
|
||||
pr_err("Failed to register DAI\n");
|
||||
mpc5200_audio_dma_destroy(op);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user