Skip to contentSkip to conversation

IB/qib: clean up properly if pci_set_consistent_dma_mask() fails

PATCH New Ralph Campbell 1 participant 1 message Oct 23, 2010 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/qib: clean up properly if pci_set_consistent_dma_mask() fails

From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Clean up properly if pci_set_consistent_dma_mask() fails.

---

 drivers/infiniband/hw/qib/qib_pcie.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/infiniband/hw/qib/qib_pcie.c +3 -1
index 8a64426..48b6674 100644
@@ -103,9 +103,11 @@ int qib_pcie_init(struct pci_dev *pdev, const struct pci_device_id *ent)
 		ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
 	} else
 		ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-	if (ret)
+	if (ret) {
 		qib_early_err(&pdev->dev,
 			      "Unable to set DMA consistent mask: %d\n", ret);
+		goto bail;
+	}
 
 	pci_set_master(pdev);
 	ret = pci_enable_pcie_error_reporting(pdev);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html