Skip to content

Commit

Permalink
IB/ipath: Fix probe failure path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Hutchings authored and Roland Dreier committed Jul 21, 2010
1 parent 589643b commit dccb816
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/infiniband/hw/ipath/ipath_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ static void ipath_verify_pioperf(struct ipath_devdata *dd)
ipath_enable_armlaunch(dd);
}

static void cleanup_device(struct ipath_devdata *dd);

static int __devinit ipath_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
Expand Down Expand Up @@ -616,8 +618,13 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
goto bail;

bail_irqsetup:
if (pdev->irq)
free_irq(pdev->irq, dd);
cleanup_device(dd);

if (dd->ipath_irq)
dd->ipath_f_free_irq(dd);

if (dd->ipath_f_cleanup)
dd->ipath_f_cleanup(dd);

bail_iounmap:
iounmap((volatile void __iomem *) dd->ipath_kregbase);
Expand All @@ -635,7 +642,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
return ret;
}

static void __devexit cleanup_device(struct ipath_devdata *dd)
static void cleanup_device(struct ipath_devdata *dd)
{
int port;
struct ipath_portdata **tmp;
Expand Down

0 comments on commit dccb816

Please sign in to comment.