mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/1] ASoC: sprd: Shadow errors from dma_request_chan()
@ 2026-09-24 16:48 Andy Shevchenko
  2026-09-25 17:52 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2026-09-24 16:48 UTC (permalink / raw)
  To: Andy Shevchenko, linux-sound, linux-kernel
  Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Sashiko

For some reason the SPDR PCM support code requests DMA resources
in the IOCTL. This might lead to the Linux error codes, such as
EPROBE_DEFER, to be leaked to the user space. Prevent that from
happening by shadowing errors from dma_request_chan() as it was
done previously (see Fixes tag).

Fixes: 08d77e31df21 ("ASoC: sprd: Replace dma_request_slave_channel() by dma_request_chan()")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260918115229.CC8AC1F000FF@smtp.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/sprd/sprd-pcm-compress.c | 2 +-
 sound/soc/sprd/sprd-pcm-dma.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/sprd/sprd-pcm-compress.c b/sound/soc/sprd/sprd-pcm-compress.c
index 0b110b72482c..d18c9a4e5a77 100644
--- a/sound/soc/sprd/sprd-pcm-compress.c
+++ b/sound/soc/sprd/sprd-pcm-compress.c
@@ -157,7 +157,7 @@ static int sprd_platform_compr_dma_config(struct snd_soc_component *component,
 	chan = dma_request_chan(dev, dma_params->chan_name[channel]);
 	if (IS_ERR(chan)) {
 		dev_err(dev, "failed to request dma channel\n");
-		return PTR_ERR(chan);
+		return -ENODEV;
 	}
 	dma->chan = chan;
 
diff --git a/sound/soc/sprd/sprd-pcm-dma.c b/sound/soc/sprd/sprd-pcm-dma.c
index bc4d24e5a25d..fadaafbd807c 100644
--- a/sound/soc/sprd/sprd-pcm-dma.c
+++ b/sound/soc/sprd/sprd-pcm-dma.c
@@ -171,7 +171,7 @@ static int sprd_pcm_request_dma_channel(struct snd_soc_component *component,
 			dev_err(dev, "failed to request dma channel:%s\n",
 				dma_params->chan_name[i]);
 			sprd_pcm_release_dma_channel(substream);
-			return PTR_ERR(chan);
+			return -ENODEV;
 		}
 		data->chan = chan;
 	}
-- 
2.50.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] ASoC: sprd: Shadow errors from dma_request_chan()
  2026-09-24 16:48 [PATCH v1 1/1] ASoC: sprd: Shadow errors from dma_request_chan() Andy Shevchenko
@ 2026-09-25 17:52 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-25 17:52 UTC (permalink / raw)
  To: linux-sound, linux-kernel, Andy Shevchenko
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Sashiko

On Thu, 24 Sep 2026 18:48:12 +0200, Andy Shevchenko wrote:
> ASoC: sprd: Shadow errors from dma_request_chan()

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/1] ASoC: sprd: Shadow errors from dma_request_chan()
      https://git.kernel.org/broonie/sound/c/b25a036348e9

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-26  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 16:48 [PATCH v1 1/1] ASoC: sprd: Shadow errors from dma_request_chan() Andy Shevchenko
2026-09-25 17:52 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®