Adjust the order of invocations in probe to avoid from the crash.
Signed-off-by: Kevin.xie <kevin.xie@starfivetech.com>
if (plda_pcie_is_link_up(pcie) == PLDA_LINK_DOWN)
goto release;
- ret = pci_host_probe(bridge);
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to pci host probe: %d\n", ret);
- goto release;
- }
-
if (IS_ENABLED(CONFIG_PCI_MSI)) {
ret = plda_pcie_enable_msi(pcie, bus);
if (ret < 0) {
}
}
+ ret = pci_host_probe(bridge);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "Failed to pci host probe: %d\n", ret);
+ goto release;
+ }
+
exit:
return ret;