aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_driver.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 21337468c652..765f0fc1da76 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -390,6 +390,8 @@ done:
390 ipath_enable_armlaunch(dd); 390 ipath_enable_armlaunch(dd);
391} 391}
392 392
393static void cleanup_device(struct ipath_devdata *dd);
394
393static int __devinit ipath_init_one(struct pci_dev *pdev, 395static int __devinit ipath_init_one(struct pci_dev *pdev,
394 const struct pci_device_id *ent) 396 const struct pci_device_id *ent)
395{ 397{
@@ -616,8 +618,13 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
616 goto bail; 618 goto bail;
617 619
618bail_irqsetup: 620bail_irqsetup:
619 if (pdev->irq) 621 cleanup_device(dd);
620 free_irq(pdev->irq, dd); 622
623 if (dd->ipath_irq)
624 dd->ipath_f_free_irq(dd);
625
626 if (dd->ipath_f_cleanup)
627 dd->ipath_f_cleanup(dd);
621 628
622bail_iounmap: 629bail_iounmap:
623 iounmap((volatile void __iomem *) dd->ipath_kregbase); 630 iounmap((volatile void __iomem *) dd->ipath_kregbase);
@@ -635,7 +642,7 @@ bail:
635 return ret; 642 return ret;
636} 643}
637 644
638static void __devexit cleanup_device(struct ipath_devdata *dd) 645static void cleanup_device(struct ipath_devdata *dd)
639{ 646{
640 int port; 647 int port;
641 struct ipath_portdata **tmp; 648 struct ipath_portdata **tmp;