Skip to content

Commit

Permalink
IB/qib: clean up properly if pci_set_consistent_dma_mask() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jason Gunthorpe authored and Roland Dreier committed Oct 26, 2010
1 parent 5d26a1d commit 2ca78d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/infiniband/hw/qib/qib_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2ca78d2

Please sign in to comment.