Skip to content

Commit 7a79008

Browse files
dinghaoliuLorenzo Pieralisi
authored andcommitted
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/[email protected] Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]>
1 parent c2615d6 commit 7a79008

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/controller/cadence/pcie-cadence-plat.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
115115
}
116116

117117
err_init:
118-
pm_runtime_put_sync(dev);
119-
120118
err_get_sync:
119+
pm_runtime_put_sync(dev);
121120
pm_runtime_disable(dev);
122121
cdns_pcie_disable_phy(cdns_plat_pcie->pcie);
123122
phy_count = cdns_plat_pcie->pcie->phy_count;

0 commit comments

Comments
 (0)