spi: ingenic: release tx DMA channel when rx request fails
PATCH 1/1 spi: ingenic: release tx DMA channel when rx request fails
When the rx channel request fails, the driver carries on without DMA but the tx channel it already acquired stayed claimed until devm teardown.
Release it on the error path so it goes straight back to the DMA engine for other users.
--- drivers/spi/spi-ingenic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spi/spi-ingenic.c +4 -1
@@ -354,8 +354,11 @@ static int spi_ingenic_request_dma(struct spi_controller *ctlr, ctlr->dma_tx = chan; chan =dma_request_chan (dev,"rx" ); -if (IS_ERR (chan)) +if (IS_ERR (chan)) { +dma_release_channel (ctlr->dma_tx); + ctlr->dma_tx =NULL ;return PTR_ERR (chan); + } ctlr->dma_rx = chan; ctlr->can_dma = spi_ingenic_can_dma;
---
base-commit: 89c07d98716a13454ec3fd9f97689e812cc71bd4
change-id: 20260904-ingenic-856fb6004802
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Mark Brown
maintainerQuoted 1 line · Felix Gu
spi: ingenic: release tx DMA channel when rx request fails
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: ingenic: release tx DMA channel when rx request fails
https://git.kernel.org/broonie/spi/c/bb308b27016c
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