Skip to content

Commit cb52a40

Browse files
dinghaoliuLorenzo Pieralisi
authored andcommitted
PCI: qcom: Fix runtime PM imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, thus a matching 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 7a79008 commit cb52a40

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,10 +1339,8 @@ static int qcom_pcie_probe(struct platform_device *pdev)
13391339

13401340
pm_runtime_enable(dev);
13411341
ret = pm_runtime_get_sync(dev);
1342-
if (ret < 0) {
1343-
pm_runtime_disable(dev);
1344-
return ret;
1345-
}
1342+
if (ret < 0)
1343+
goto err_pm_runtime_put;
13461344

13471345
pci->dev = dev;
13481346
pci->ops = &dw_pcie_ops;

0 commit comments

Comments
 (0)