ASoC: sprd: Shadow errors from dma_request_chan()
Subsystems (3)
PATCH 1/1 ASoC: sprd: Shadow errors from dma_request_chan()
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).
--- sound/soc/sprd/sprd-pcm-compress.c | 2 +- sound/soc/sprd/sprd-pcm-dma.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/sprd/sprd-pcm-compress.c +1 -1
@@ -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;
sound/soc/sprd/sprd-pcm-dma.c +1 -1
@@ -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; }
Signature · 1 line
2.50.1
Mark Brown
maintainerQuoted 1 line · Andy Shevchenko
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