summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/device/pci_device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index a61fbd6c49..ed95dff953 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -1216,6 +1216,9 @@ static bool pci_bus_only_one_child(struct bus *bus)
u16 pcie_pos, pcie_flags_reg;
int pcie_type;
+ if (!bridge)
+ return false;
+
pcie_pos = pci_find_capability(bridge, PCI_CAP_ID_PCIE);
if (!pcie_pos)
return false;