Skip to content

Commit

Permalink
dmaengine: at_xdmac: fix to pass correct device identity to free_irq()
Browse files Browse the repository at this point in the history
free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Fixes: e1f7c9e ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Wei Yongjun authored and Vinod Koul committed Aug 22, 2016
1 parent 93e11eb commit 6a8b0c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
err_clk_disable:
clk_disable_unprepare(atxdmac->clk);
err_free_irq:
free_irq(atxdmac->irq, atxdmac->dma.dev);
free_irq(atxdmac->irq, atxdmac);
return ret;
}

Expand All @@ -2081,7 +2081,7 @@ static int at_xdmac_remove(struct platform_device *pdev)
dma_async_device_unregister(&atxdmac->dma);
clk_disable_unprepare(atxdmac->clk);

free_irq(atxdmac->irq, atxdmac->dma.dev);
free_irq(atxdmac->irq, atxdmac);

for (i = 0; i < atxdmac->dma.chancnt; i++) {
struct at_xdmac_chan *atchan = &atxdmac->chan[i];
Expand Down

0 comments on commit 6a8b0c6

Please sign in to comment.