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

Commit 2ca78d23 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Roland Dreier
Browse files

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: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5d26a1df
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);