Unverified Commit 5d8a355d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents e3cd8c9a 87b693cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -579,6 +579,11 @@ static void __iomem *msix_map_region(struct pci_dev *dev,
	pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
			      &table_offset);
	bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);
	if (bir >= DEVICE_COUNT_RESOURCE) {
		dev_err(&dev->dev, "MSI-X Table BIR is out of range !\n");
		return NULL;
	}

	flags = pci_resource_flags(dev, bir);
	if (!flags || (flags & IORESOURCE_UNSET))
		return NULL;