Patchwork fsldma: check for NO_IRQ in fsl_dma_chan_remove()

login
register
mail settings
Submitter Peter Korsgaard
Date Jan. 14, 2009, 4:20 p.m.
Message ID <1231950015-19584-1-git-send-email-jacmet@sunsite.dk>
Download mbox | patch
Permalink /patch/18466/
State Accepted
Delegated to: Kumar Gala
Headers show

Comments

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

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);