spi: atcspi200: fix use-after-free when driver unbind

DMA resource is initialized after SPI controller registration. So
when driver unbind, this can trigger a use-after-free when DMA is
torn down while the controller is still alive and triggers DMA transfers.

Fixes: 34e3815ea4 ("spi: atcspi200: Add ATCSPI200 SPI controller driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260417-atcspi-v1-1-854831667d63@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Felix Gu 2026-04-17 00:27:54 +08:00 • committed by Mark Brown
commit 565bdf4512
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0