From: Richard Genoud Date: Tue, 27 Nov 2018 16:06:35 +0000 (+0100) Subject: dmaengine: at_hdmac: fix module unloading X-Git-Tag: v3.18.129~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df001cdfbb24f995933ecf3a858193ff2d9208ad;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git dmaengine: at_hdmac: fix module unloading commit 77e75fda94d2ebb86aa9d35fb1860f6395bf95de upstream. of_dma_controller_free() was not called on module onloading. This lead to a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Modules linked in: at_hdmac [last unloaded: at_hdmac] when of_dma_request_slave_channel() tried to call ofdma->of_dma_xlate(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Acked-by: Ludovic Desroches Signed-off-by: Richard Genoud Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index dfc5edf0..f989c18 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -1565,6 +1565,8 @@ static int at_dma_remove(struct platform_device *pdev) struct resource *io; at_dma_off(atdma); + if (pdev->dev.of_node) + of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->dma_desc_pool);