IB/ipath: Call free_irq() on chip specific initialization failure
authorArthur Jones <arthur.jones@qlogic.com>
Thu, 15 Mar 2007 21:45:04 +0000 (14:45 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 19 Apr 2007 03:20:58 +0000 (20:20 -0700)
In initialization, if we bailed at chip specific initialization, we
forgot to clean up the irq we had requested.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_driver.c

index 291d4ea69a40bdfe81610e9a82c3446bae6425fb..ab7458e904c3cb2acdf6264fad4fa8365043a574 100644 (file)
@@ -486,7 +486,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
 
        ret = ipath_init_chip(dd, 0);   /* do the chip-specific init */
        if (ret)
-               goto bail_iounmap;
+               goto bail_irqsetup;
 
        ret = ipath_enable_wc(dd);
 
@@ -505,6 +505,9 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
 
        goto bail;
 
+bail_irqsetup:
+       if (pdev->irq) free_irq(pdev->irq, dd);
+
 bail_iounmap:
        iounmap((volatile void __iomem *) dd->ipath_kregbase);