summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2023-08-29 11:03:51 -0500
committerBjorn Helgaas <bhelgaas@google.com>2023-08-29 11:03:51 -0500
commit98072e31aeee1500b11b2ed6530464f8aeb69032 (patch)
tree67ebb5f78471eff0114ed54ae75641a56aaa8e72 /drivers/pci
parent3c298b840c196af2f738471ccf0ca40f7dae921a (diff)
parentd8650c0c2aa2e413594e4cb0faafa9958c1d7782 (diff)
Merge branch 'pci/controller/apple'
- Initialize pcie->nvecs (number of available MSIs) before use (Sven Peter) * pci/controller/apple: PCI: apple: Initialize pcie->nvecs before use
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/pcie-apple.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c
index 66f37e403a09..2340dab6cd5b 100644
--- a/drivers/pci/controller/pcie-apple.c
+++ b/drivers/pci/controller/pcie-apple.c
@@ -783,6 +783,10 @@ static int apple_pcie_init(struct pci_config_window *cfg)
cfg->priv = pcie;
INIT_LIST_HEAD(&pcie->ports);
+ ret = apple_msi_init(pcie);
+ if (ret)
+ return ret;
+
for_each_child_of_node(dev->of_node, of_port) {
ret = apple_pcie_setup_port(pcie, of_port);
if (ret) {
@@ -792,7 +796,7 @@ static int apple_pcie_init(struct pci_config_window *cfg)
}
}
- return apple_msi_init(pcie);
+ return 0;
}
static int apple_pcie_probe(struct platform_device *pdev)