aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFelix Gu <ustc.gu@gmail.com>2026-05-22 20:40:48 +0800
committerMark Brown <broonie@kernel.org>2026-06-01 15:03:02 +0100
commitbd7e9843ec95bffe2643c901dd625f0bab32e639 (patch)
tree3efd432a2465cfba85eff3df55251799e9e03516 /include/linux
parent82056957e5c42c4060a1d8b1576aad2dfe54e568 (diff)
spi: atmel: fix DMA channel and bounce buffer leaks
The original code set use_dma to false when dma_alloc_coherent() for bounce buffers failed, but DMA channels acquired earlier via atmel_spi_configure_dma() were never freed. When devm_request_irq() or clk_prepare_enable() failed later in probe, the driver also did not release DMA channels or bounce buffers already allocated. The out_free_dma error path released DMA channels but did not free the bounce buffers. Fix by moving bounce buffer allocation into atmel_spi_configure_dma() and registering the devres cleanup for DMA channels and bounce buffers. Fixes: a9889ed62d06 ("spi: atmel: Implements transfers with bounce buffer") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Link: https://patch.msgid.link/20260522-atmel-v3-1-23f8c6e6aa43@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions