diff options
| author | Haotian Zhang <vulab@iscas.ac.cn> | 2025-12-02 18:16:42 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-18 14:03:35 +0100 |
| commit | 488ef9dd5c094a96d506a502aa467b983484c4b5 (patch) | |
| tree | 4a72a13eb811d13be9828b6ac02a418480a2571c /sound/soc | |
| parent | 2606e7e090fe19237cf8604e3445e1c4cf657c88 (diff) | |
| download | linux-488ef9dd5c094a96d506a502aa467b983484c4b5.tar.gz linux-488ef9dd5c094a96d506a502aa467b983484c4b5.tar.bz2 linux-488ef9dd5c094a96d506a502aa467b983484c4b5.zip | |
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
[ Upstream commit 0ebbd45c33d0049ebf5a22c1434567f0c420b333 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
| -rw-r--r-- | sound/soc/bcm/bcm63xx-pcm-whistler.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c index e3a4fcc63a56..efeb06ddabeb 100644 --- a/sound/soc/bcm/bcm63xx-pcm-whistler.c +++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c @@ -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) |
