fsldma: check for NO_IRQ in fsl_dma_chan_remove()

Submitted by Peter Korsgaard on Jan. 14, 2009, 4:20 p.m.

Details

Message ID 1231950015-19584-1-git-send-email-jacmet@sunsite.dk
State Accepted, archived
Delegated to: Kumar Gala
Headers show

Commit Message

Peter Korsgaard Jan. 14, 2009, 4:20 p.m.
There's no per-channel IRQ on mpc83xx, so only call free_irq if we have one.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 drivers/dma/fsldma.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index ca70a21..f48c0e6 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -890,7 +890,8 @@  err_no_reg:
 
 static void fsl_dma_chan_remove(struct fsl_dma_chan *fchan)
 {
-	free_irq(fchan->irq, fchan);
+	if (fchan->irq != NO_IRQ)
+		free_irq(fchan->irq, fchan);
 	list_del(&fchan->common.device_node);
 	iounmap(fchan->reg_base);
 	kfree(fchan);