[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200520082228.26881-1-dinghao.liu@zju.edu.cn>
Date: Wed, 20 May 2020 16:22:28 +0800
From: Dinghao Liu <dinghao.liu@....edu.cn>
To: dinghao.liu@....edu.cn, kjlu@....edu
Cc: Marek Vasut <marek.vasut+renesas@...il.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] PCI: rcar: 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.
Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
---
drivers/pci/controller/pcie-rcar.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
index 759c6542c5c8..a9de65438051 100644
--- a/drivers/pci/controller/pcie-rcar.c
+++ b/drivers/pci/controller/pcie-rcar.c
@@ -1207,9 +1207,8 @@ static int rcar_pcie_probe(struct platform_device *pdev)
irq_dispose_mapping(pcie->msi.irq1);
err_pm_put:
- pm_runtime_put(dev);
-
err_pm_disable:
+ pm_runtime_put(dev);
pm_runtime_disable(dev);
pci_free_resource_list(&pcie->resources);
--
2.17.1
Powered by blists - more mailing lists