Skip to content

Commit 50b040e

Browse files
spasswolfBartosz Golaszewski
authored andcommitted
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: 8fb1861 ("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]>
1 parent eba6d0f commit 50b040e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void pci_bus_add_device(struct pci_dev *dev)
356356

357357
pci_dev_assign_added(dev, true);
358358

359-
if (pci_is_bridge(dev)) {
359+
if (IS_ENABLED(CONFIG_OF) && pci_is_bridge(dev)) {
360360
retval = of_platform_populate(dev->dev.of_node, NULL, NULL,
361361
&dev->dev);
362362
if (retval)

0 commit comments

Comments
 (0)