|
@@ -1165,7 +1165,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
|
|
|
if (rcar_pcie_hw_init(pcie)) {
|
|
|
dev_info(dev, "PCIe link down\n");
|
|
|
err = -ENODEV;
|
|
|
- goto err_clk_disable;
|
|
|
+ goto err_phy_shutdown;
|
|
|
}
|
|
|
|
|
|
data = rcar_pci_read_reg(pcie, MACSR);
|
|
@@ -1177,7 +1177,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
|
|
|
dev_err(dev,
|
|
|
"failed to enable MSI support: %d\n",
|
|
|
err);
|
|
|
- goto err_clk_disable;
|
|
|
+ goto err_phy_shutdown;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1191,6 +1191,12 @@ err_msi_teardown:
|
|
|
if (IS_ENABLED(CONFIG_PCI_MSI))
|
|
|
rcar_pcie_teardown_msi(pcie);
|
|
|
|
|
|
+err_phy_shutdown:
|
|
|
+ if (pcie->phy) {
|
|
|
+ phy_power_off(pcie->phy);
|
|
|
+ phy_exit(pcie->phy);
|
|
|
+ }
|
|
|
+
|
|
|
err_clk_disable:
|
|
|
clk_disable_unprepare(pcie->bus_clk);
|
|
|
|