diff options
author | Bert Karwatzki <[email protected]> | 2024-07-07 20:38:28 +0200 |
---|---|---|
committer | Bartosz Golaszewski <[email protected]> | 2024-07-08 21:15:26 +0200 |
commit | 50b040ef373293b4ae2ecdc5873daa4656724868 (patch) | |
tree | 82b6eede56fdd98553bf55b0e8a234fe67afdcc9 | |
parent | eba6d0f88ba2c4e9175aae8556125a05980ff8f5 (diff) |
PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled
If of_platform_populate() is called when CONFIG_OF is not defined this
leads to spurious error messages of the following type:
pci 0000:00:01.1: failed to populate child OF nodes (-19)
pci 0000:00:02.1: failed to populate child OF nodes (-19)
Fixes: 8fb18619d910 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
Signed-off-by: Bert Karwatzki <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Reviewed-by: Lukas Wunner <[email protected]>
Acked-by: Krzysztof WilczyĆski <[email protected]>
Reported-by: Praveenkumar Patil <[email protected]>
Acked-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
-rw-r--r-- | drivers/pci/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 3e3517567721..8765e2d2aafa 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -356,7 +356,7 @@ void pci_bus_add_device(struct pci_dev *dev) pci_dev_assign_added(dev, true); - if (pci_is_bridge(dev)) { + if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) { retval = of_platform_populate(dev->dev.of_node, NULL, NULL, &dev->dev); if (retval) |