Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dccb816d authored by Ben Hutchings's avatar Ben Hutchings Committed by Roland Dreier
Browse files

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: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 589643be
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -390,6 +390,8 @@ static void ipath_verify_pioperf(struct ipath_devdata *dd)
	ipath_enable_armlaunch(dd);
	ipath_enable_armlaunch(dd);
}
}


static void cleanup_device(struct ipath_devdata *dd);

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


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

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

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


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


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