diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2010-06-11 22:25:09 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-21 13:48:39 -0400 |
commit | dccb816de38efe72becc5d7f90a5dfedcd6fd053 (patch) | |
tree | b438b8fe8cd90d132cb864bb741a391a8dd8cb42 /drivers/infiniband | |
parent | 589643be6693c46fbc54bae77745f336c8ed4bcc (diff) |
IB/ipath: Fix probe failure path
The failure path in ipath_init_one() does not match the cleanup code
in ipath_remove_one() and appears to leave interrupts enabled in some
cases. Change it to match.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 13 |
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 | ||
393 | static void cleanup_device(struct ipath_devdata *dd); | ||
394 | |||
393 | static int __devinit ipath_init_one(struct pci_dev *pdev, | 395 | static 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 | ||
618 | bail_irqsetup: | 620 | bail_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 | ||
622 | bail_iounmap: | 629 | bail_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 | ||
638 | static void __devexit cleanup_device(struct ipath_devdata *dd) | 645 | static 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; |