ASoC: samsung: idma: Check of ioremap return value
Subsystems (3)
PATCH 1/1 ASoC: samsung: idma: Check of ioremap return value
Because of the potential failure of the ioremap(), the buf->area could be NULL.
Therefore, we need to check it and return -ENOMEM in order to transfer the error.
--- sound/soc/samsung/idma.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/samsung/idma.c +2 -0
@@ -360,6 +360,8 @@ static int preallocate_idma_buffer(struct snd_pcm *pcm, int stream) buf->addr = idma.lp_tx_addr; buf->bytes = idma_hardware.buffer_bytes_max; buf->area = (unsigned char *__force )ioremap (buf->addr, buf->bytes); +if (!buf->area) +return -ENOMEM ;return 0 ; }
Signature · 1 line
2.25.1
Quoted 11 lines · Jiasheng Jiang
Because of the potential failure of the
ioremap(), thebuf->areacould be NULL.
Therefore, we need to check it and return-ENOMEMin order to transfer the error.Fixes f09aecd50f39 ("ASoC: SAMSUNG: Add I2S0 internal dma driver")Signed-off-by Jiasheng Jiang <[email protected]>--- sound/soc/samsung/idma.c | 2 ++ 1 file changed, 2 insertions(+)
Best regards,
Krzysztof
Mark Brown
maintainerQuoted 6 lines · Jiasheng Jiang
Because of the potential failure of the
ioremap(), thebuf->areacould be NULL.
Therefore, we need to check it and return-ENOMEMin order to transfer the error.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: samsung: idma: Check of ioremap return value
commit: 3ecb46755eb85456b459a1a9f952c52986bce8ec
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