board_inspector: filter out non-present PCI buses

The lookup extractor of the board inspector filters out non-PCI or
non-present devices by checking the presence of vendor ID and class code.
The same logic applies to PCI buses as well, but is neglected today.

This patch adds the missing check.

Tracked-On: #6689
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao 2022-04-20 11:04:06 +08:00 committed by acrnsi-robot
parent 4fe6cae877
commit 739ecc629f

View File

@ -134,7 +134,7 @@ def lookup_pci_devices(board_etree):
for device in devices:
lookup_pci_device(device, ids)
buses = board_etree.xpath("//bus[@type = 'pci']")
buses = board_etree.xpath("//bus[@type = 'pci' and vendor and class]")
for bus in buses:
lookup_pci_device(bus, ids)