device/pci_device: Fix leftover devices

Don't print leftover devices when they are disabled in the devicetree.
It's expected to not find a device when it's not enabled.

Change-Id: Ia6e998d3088fbd329f976e66a92e08ecae9f760a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86491
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
Patrick Rudolph 2025-02-13 13:03:37 +01:00 committed by Sean Rhodes
commit dd817408e1

View file

@ -1442,7 +1442,7 @@ void pci_scan_bus(struct bus *bus, unsigned int min_devfn,
* and it has a Vendor ID of 0 (the default for a device that
* could not be probed).
*/
if (dev->vendor != 0 || dev->hidden) {
if (dev->vendor != 0 || dev->hidden || !dev->enabled) {
prev = &dev->sibling;
continue;
}