summaryrefslogtreecommitdiffstats
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/pci_device.c')
-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 a61fbd6c4944..ed95dff953b7 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;