dmaengine: dw-edma: Fix crash on loading/unloading driver
authorGustavo Pimentel <Gustavo.Pimentel@synopsys.com>
Thu, 18 Feb 2021 19:04:06 +0000 (20:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 09:40:52 +0000 (11:40 +0200)
commit3029ef71ab227af7c0ffb7956c2da4b1882aa23b
treefb65945a239f9bfe6c11ee03bce7d6d88d0a6f85
parent13a2ca80d792d978252863bc010c2b3a0ac6ec30
dmaengine: dw-edma: Fix crash on loading/unloading driver

[ Upstream commit e970dcc4bd8e0a1376e794fc81d41d0fc98262dd ]

When the driver is compiled as a module and loaded if we try to unload
it, the Kernel shows a crash log. This Kernel crash is due to the
dma_async_device_unregister() call done after deleting the channels,
this patch fixes this issue.

Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Link: https://lore.kernel.org/r/4aa850c035cf7ee488f1d3fb6dee0e37be0dce0a.1613674948.git.gustavo.pimentel@synopsys.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/dw-edma/dw-edma-core.c