]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 8 Apr 2021 07:24:02 +0000 (15:24 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:19:25 +0000 (10:19 +0100)
commite0a76d3109c5bb53d5571d1e24f6a65e28031502
tree12378239eca7fd6641b5652c9948802af2770f7a
parent2d9c28b86b76c6ff15ee77234e5c1b9f5fe097f9
PCI: rcar: Fix runtime PM imbalance in rcar_pcie_ep_probe()

BugLink: https://bugs.launchpad.net/bugs/1948873
[ Upstream commit 1e29cd9983eba1b596bc07f94d81d728007f8a25 ]

pm_runtime_get_sync() will increase the runtime PM counter
even it returns an error. Thus a pairing decrement is needed
to prevent refcount leak. Fix this by replacing this API with
pm_runtime_resume_and_get(), which will not change the runtime
PM counter on error.

Link: https://lore.kernel.org/r/20210408072402.15069-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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/pci/controller/pcie-rcar-ep.c