dmaengine: axi-dmac: fix possible race in remove()
authorNuno Sa <nuno.sa@analog.com>
Thu, 28 Mar 2024 13:58:50 +0000 (14:58 +0100)
committerVinod Koul <vkoul@kernel.org>
Sun, 7 Apr 2024 11:40:20 +0000 (17:10 +0530)
commit1bc31444209c8efae98cb78818131950d9a6f4d6
tree83c1be7b2a900948ca7342c6575faeb694155b58
parentec177e46451597ac9d2e371e216afca9535ee547
dmaengine: axi-dmac: fix possible race in remove()

We need to first free the IRQ before calling of_dma_controller_free().
Otherwise we could get an interrupt and schedule a tasklet while
removing the DMA controller.

Fixes: 0e3b67b348b8 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller")
Cc: stable@kernel.org
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240328-axi-dmac-devm-probe-v3-1-523c0176df70@analog.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dma-axi-dmac.c