Skip to content

Commit a68e06e

Browse files
dinghaoliuLorenzo Pieralisi
authored andcommitted
PCI: rcar: Fix runtime PM imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even when the call returns an error code. Thus a corresponding decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/[email protected] Fixes: 0df6150 ("PCI: rcar: Use runtime PM to control controller clock") Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Yoshihiro Shimoda <[email protected]>
1 parent cb52a40 commit a68e06e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/pci/controller/pcie-rcar-host.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
986986
err = pm_runtime_get_sync(pcie->dev);
987987
if (err < 0) {
988988
dev_err(pcie->dev, "pm_runtime_get_sync failed\n");
989-
goto err_pm_disable;
989+
goto err_pm_put;
990990
}
991991

992992
err = rcar_pcie_get_resources(host);
@@ -1057,8 +1057,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
10571057

10581058
err_pm_put:
10591059
pm_runtime_put(dev);
1060-
1061-
err_pm_disable:
10621060
pm_runtime_disable(dev);
10631061
pci_free_resource_list(&host->resources);
10641062

0 commit comments

Comments
 (0)