summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2010-10-25 21:19:06 -0700
committerRoland Dreier <rolandd@cisco.com>2010-10-26 16:09:02 -0700
commit2ca78d23a758d3299abd128556debff4c1fefb16 (patch)
tree71174ef73c7271b5674353a7a0772a332853b746 /drivers/infiniband
parent5d26a1df23f7e904e7b03bb2580288f6ae7cfe48 (diff)
downloadop-kernel-dev-2ca78d23a758d3299abd128556debff4c1fefb16.zip
op-kernel-dev-2ca78d23a758d3299abd128556debff4c1fefb16.tar.gz
IB/qib: clean up properly if pci_set_consistent_dma_mask() fails
Clean up properly if pci_set_consistent_dma_mask() fails. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/qib/qib_pcie.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 8a64426..48b6674 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -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);
OpenPOWER on IntegriCloud