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

Commit dcaa73dc authored by Yijing Wang's avatar Yijing Wang Committed by Bjorn Helgaas
Browse files

IB/qib: Use pci_is_root_bus() to check whether it is a root bus



Use pci_is_root_bus() instead of "if (bus->parent)" statement
for better readability.

Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
parent 503275bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd)

	/* Find out supported and configured values for parent (root) */
	parent = dd->pcidev->bus->self;
	if (parent->bus->parent) {
	if (!pci_is_root_bus(parent->bus)) {
		qib_devinfo(dd->pcidev, "Parent not root\n");
		goto bail;
	}