2019-07-03 05:56:39

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] unicore32: dma: fix to pass correct device identity to free_irq()

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Fixes: 10c9c10c3151 ("unicore32 core architecture: mm related: consistent device DMA handling")
Signed-off-by: Wei Yongjun <[email protected]>
---
arch/unicore32/kernel/dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/unicore32/kernel/dma.c b/arch/unicore32/kernel/dma.c
index 7a0e2d4d6077..2b8666f8a37d 100644
--- a/arch/unicore32/kernel/dma.c
+++ b/arch/unicore32/kernel/dma.c
@@ -169,7 +169,7 @@ int __init puv3_init_dma(void)
ret = request_irq(IRQ_DMAERR, dma_err_handler, 0, "DMAERR", NULL);
if (ret) {
printk(KERN_CRIT "Can't register IRQ for DMAERR\n");
- free_irq(IRQ_DMA, "DMA");
+ free_irq(IRQ_DMA, NULL);
return ret;
}