Message ID | 20240717042746.8766-1-manivannan.sadhasivam@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 24777bac4af5fcddb0cf4a7d8a2b6ee2a98fe6fd |
Delegated to: | Krzysztof WilczyĆski |
Headers | show |
Series | [v2] PCI: Check for the existence of 'dev.of_node' before calling of_platform_populate() | expand |
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 3bab78cc68f7..55c853686051 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -350,8 +350,8 @@ void pci_bus_add_device(struct pci_dev *dev) pci_dev_assign_added(dev, true); - if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) { - retval = of_platform_populate(dev->dev.of_node, NULL, NULL, + if (dev_of_node(&dev->dev) && pci_is_bridge(dev)) { + retval = of_platform_populate(dev_of_node(&dev->dev), NULL, NULL, &dev->dev); if (retval) pci_err(dev, "failed to populate child OF nodes (%d)\n",