diff options
author | Rob Herring <[email protected]> | 2021-08-03 15:56:55 -0600 |
---|---|---|
committer | Lorenzo Pieralisi <[email protected]> | 2021-08-04 12:20:00 +0100 |
commit | d277f6e88c88729b1d57d40bbfb00d0bfc961972 (patch) | |
tree | 0b1ebe547d93b8588a55db918e0dc888ce75dba1 | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) |
PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
Commit 669cbc708122 ("PCI: Move DT resource setup into
devm_pci_alloc_host_bridge()") made devm_pci_alloc_host_bridge() fail on
any DT resource parsing errors, but Broadcom iProc uses
devm_pci_alloc_host_bridge() on BCMA bus devices that don't have DT
resources. In particular, there is no 'ranges' property. Fix iProc by
making 'ranges' optional.
If 'ranges' is required by a platform, there's going to be more errors
latter on if it is missing.
Link: https://lore.kernel.org/r/[email protected]
Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
Reported-by: Rafał Miłecki <[email protected]>
Tested-by: Rafał Miłecki <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Cc: Srinath Mannam <[email protected]>
Cc: Roman Bacik <[email protected]>
Cc: Bharat Gooty <[email protected]>
Cc: Abhishek Shah <[email protected]>
Cc: Jitendra Bhivare <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: BCM Kernel Feedback <[email protected]>
Cc: Scott Branden <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
-rw-r--r-- | drivers/pci/of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/of.c b/drivers/pci/of.c index a143b02b2dcd..d84381ce82b5 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -310,7 +310,7 @@ static int devm_of_pci_get_host_bridge_resources(struct device *dev, /* Check for ranges property */ err = of_pci_range_parser_init(&parser, dev_node); if (err) - goto failed; + return 0; dev_dbg(dev, "Parsing ranges property...\n"); for_each_of_pci_range(&parser, &range) { |