Skip to content

Commit 98072e3

Browse files
committed
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
2 parents 3c298b8 + d8650c0 commit 98072e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/pci/controller/pcie-apple.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,10 @@ static int apple_pcie_init(struct pci_config_window *cfg)
783783
cfg->priv = pcie;
784784
INIT_LIST_HEAD(&pcie->ports);
785785

786+
ret = apple_msi_init(pcie);
787+
if (ret)
788+
return ret;
789+
786790
for_each_child_of_node(dev->of_node, of_port) {
787791
ret = apple_pcie_setup_port(pcie, of_port);
788792
if (ret) {
@@ -792,7 +796,7 @@ static int apple_pcie_init(struct pci_config_window *cfg)
792796
}
793797
}
794798

795-
return apple_msi_init(pcie);
799+
return 0;
796800
}
797801

798802
static int apple_pcie_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)