]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
authorHaotian Zhang <vulab@iscas.ac.cn>
Tue, 2 Dec 2025 10:16:42 +0000 (18:16 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 3 Dec 2025 11:26:14 +0000 (11:26 +0000)
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: 88eb404ccc3e ("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>
sound/soc/bcm/bcm63xx-pcm-whistler.c

index e3a4fcc63a56dcf3a98cbafadd6ba837378f0bf5..efeb06ddabeb3b3960384e9c3f64baa97f25525c 100644 (file)
@@ -358,7 +358,9 @@ static int bcm63xx_soc_pcm_new(struct snd_soc_component *component,
 
        i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
 
-       of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
+       ret = of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
+       if (ret)
+               return ret;
 
        ret = dma_coerce_mask_and_coherent(pcm->card->dev, DMA_BIT_MASK(32));
        if (ret)