Merge branch 'remotes/lorenzo/pci/runtime-pm'
- Fix runtime power management imbalance for cadence, dra7xx, qcom, rcar (Dinghao Liu) * remotes/lorenzo/pci/runtime-pm: PCI: rcar: Fix runtime PM imbalance on error PCI: qcom: Fix runtime PM imbalance on error PCI: cadence: Fix runtime PM imbalance on error PCI: dwc: pci-dra7xx: Fix runtime PM imbalance on error
This commit is contained in:
@@ -128,9 +128,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
err_init:
|
err_init:
|
||||||
pm_runtime_put_sync(dev);
|
|
||||||
|
|
||||||
err_get_sync:
|
err_get_sync:
|
||||||
|
pm_runtime_put_sync(dev);
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
cdns_pcie_disable_phy(cdns_plat_pcie->pcie);
|
cdns_pcie_disable_phy(cdns_plat_pcie->pcie);
|
||||||
phy_count = cdns_plat_pcie->pcie->phy_count;
|
phy_count = cdns_plat_pcie->pcie->phy_count;
|
||||||
|
@@ -995,9 +995,8 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_gpio:
|
err_gpio:
|
||||||
pm_runtime_put(dev);
|
|
||||||
|
|
||||||
err_get_sync:
|
err_get_sync:
|
||||||
|
pm_runtime_put(dev);
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
dra7xx_pcie_disable_phy(dra7xx);
|
dra7xx_pcie_disable_phy(dra7xx);
|
||||||
|
|
||||||
|
@@ -1382,10 +1382,8 @@ static int qcom_pcie_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pm_runtime_enable(dev);
|
pm_runtime_enable(dev);
|
||||||
ret = pm_runtime_get_sync(dev);
|
ret = pm_runtime_get_sync(dev);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
pm_runtime_disable(dev);
|
goto err_pm_runtime_put;
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
pci->dev = dev;
|
pci->dev = dev;
|
||||||
pci->ops = &dw_pcie_ops;
|
pci->ops = &dw_pcie_ops;
|
||||||
|
@@ -986,7 +986,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
|
|||||||
err = pm_runtime_get_sync(pcie->dev);
|
err = pm_runtime_get_sync(pcie->dev);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(pcie->dev, "pm_runtime_get_sync failed\n");
|
dev_err(pcie->dev, "pm_runtime_get_sync failed\n");
|
||||||
goto err_pm_disable;
|
goto err_pm_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = rcar_pcie_get_resources(host);
|
err = rcar_pcie_get_resources(host);
|
||||||
@@ -1057,8 +1057,6 @@ err_unmap_msi_irqs:
|
|||||||
|
|
||||||
err_pm_put:
|
err_pm_put:
|
||||||
pm_runtime_put(dev);
|
pm_runtime_put(dev);
|
||||||
|
|
||||||
err_pm_disable:
|
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
pci_free_resource_list(&host->resources);
|
pci_free_resource_list(&host->resources);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user