Commit ff89b070 authored by Adit Ranadive's avatar Adit Ranadive Committed by Doug Ledford

IB/vmw_pvrdma: Fix incorrect cleanup on pvrdma_pci_probe error path

If the interrupt allocation failed we should start freeing the CQ rings
rather than unregistering the netdev notifier.

Fixes: 29c8d9eb ("IB: Add vmw_pvrdma driver")
Signed-off-by: default avatarAdit Ranadive <aditr@vmware.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 7d211c81
......@@ -1029,7 +1029,7 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
if (ret) {
dev_err(&pdev->dev, "failed to allocate interrupts\n");
ret = -ENOMEM;
goto err_netdevice;
goto err_free_cq_ring;
}
/* Allocate UAR table. */
......@@ -1092,8 +1092,6 @@ static int pvrdma_pci_probe(struct pci_dev *pdev,
err_free_intrs:
pvrdma_free_irq(dev);
pvrdma_disable_msi_all(dev);
err_netdevice:
unregister_netdevice_notifier(&dev->nb_netdev);
err_free_cq_ring:
pvrdma_page_dir_cleanup(dev, &dev->cq_pdir);
err_free_async_ring:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment