[PATCH] PCI: of: Skip dynamic nodes for bridges without a subordinate bus

From: Angel J

Date: Fri Sep 11 2026 - 19:05:11 EST


A device can satisfy pci_is_bridge() without having a subordinate bus.
The dynamic OF helpers for bus-range and interrupt-map dereference
pdev->subordinate without checking it.

On a Dell XPS 8940, device 0000:00:00.0 [8086:4c43] has no subordinate
bus, and enabling CONFIG_PCI_DYNAMIC_OF_NODES causes an early boot hang.

Skip dynamic OF node creation for bridges without a subordinate bus.
This allows the machine to boot while preserving node creation for the
other bridges.

Fixes: 407d1a51921e ("PCI: Create device tree node for bridge")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Angel J <iamanaws@xxxxxxxxx>
---
drivers/pci/of.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index a51dff91b..971c79c2a 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -765,6 +765,10 @@ void of_pci_make_dev_node(struct pci_dev *pdev)
if (!ppnode)
return;

+ /* Bridge properties require a subordinate bus. */
+ if (pci_is_bridge(pdev) && !pdev->subordinate)
+ return;
+
if (pci_is_bridge(pdev))
pci_type = "pci";
else
--
2.54.0