PCI: cadence: Fix runtime PM imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/20200520090253.2761-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
This commit is contained in:
Родитель
c2615d620a
Коммит
7a790087c1
|
@ -115,9 +115,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
err_init:
|
||||
pm_runtime_put_sync(dev);
|
||||
|
||||
err_get_sync:
|
||||
pm_runtime_put_sync(dev);
|
||||
pm_runtime_disable(dev);
|
||||
cdns_pcie_disable_phy(cdns_plat_pcie->pcie);
|
||||
phy_count = cdns_plat_pcie->pcie->phy_count;
|
||||
|
|
Загрузка…
Ссылка в новой задаче