Skip to content

Commit 0ebbd45

Browse files
ISCAS-Vulabbroonie
authored andcommitted
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
bcm63xx_soc_pcm_new() does not check the return value of of_dma_configure(), which may fail with -EPROBE_DEFER or other errors, allowing PCM setup to continue with incomplete DMA configuration. Add error checking for of_dma_configure() and return on failure. Fixes: 88eb404 ("ASoC: brcm: Add DSL/PON SoC audio driver") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20251202101642.492-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2b69bee commit 0ebbd45

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sound/soc/bcm/bcm63xx-pcm-whistler.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,9 @@ static int bcm63xx_soc_pcm_new(struct snd_soc_component *component,
358358

359359
i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
360360

361-
of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
361+
ret = of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
362+
if (ret)
363+
return ret;
362364

363365
ret = dma_coerce_mask_and_coherent(pcm->card->dev, DMA_BIT_MASK(32));
364366
if (ret)

0 commit comments

Comments
 (0)