aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/pcie-slot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index 77e356c..c306904 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -575,8 +575,9 @@ struct pci_slot *pcie_slot_create_dynamic(struct phb *phb,
*
* We have same issue with PEX8718 as above on "p8dnu" platform.
*/
- if (dt_node_is_compatible(dt_root, "supermicro,p8dnu") && slot->pd &&
- (slot->pd->vdid == 0x973310b5 || slot->pd->vdid == 0x871810b5))
+ if (dt_node_is_compatible(dt_root, "supermicro,p8dnu") && slot &&
+ slot->pd && (slot->pd->vdid == 0x973310b5 ||
+ slot->pd->vdid == 0x871810b5))
pci_slot_add_flags(slot, PCI_SLOT_FLAG_FORCE_POWERON);
return slot;