fsldma: check for NO_IRQ in fsl_dma_chan_remove()
authorPeter Korsgaard <jacmet@sunsite.dk>
Thu, 15 Jan 2009 05:32:58 +0000 (22:32 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 15 Jan 2009 05:32:58 +0000 (22:32 -0700)
There's no per-channel IRQ on mpc83xx, so only call free_irq if we have one.

Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/fsldma.c

index 748e140c5a184397895f2b31fc3414b7352e9af4..b1b45eb42cb2af0476a64f723c91af35ed9fa15d 100644 (file)
@@ -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);