]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
PCI: tegra: Fix runtime PM imbalance on error
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Thu, 21 May 2020 02:47:09 +0000 (10:47 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:54 +0000 (14:47 +0100)
commitd0e472825879f3783127cbd6794684da0373379a
treef2d4e78a268271aec23f11503433b66c4d5148ee
parenta8712e406ba7c84f70036c3c5faaeed90ba83011
PCI: tegra: Fix runtime PM imbalance on error

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit fcee90cdf6f3a3a371add04d41528d5ba9c3b411 ]

pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Also, call pm_runtime_disable() when pm_runtime_get_sync() returns
an error code.

Link: https://lore.kernel.org/r/20200521024709.2368-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>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/pci/controller/pci-tegra.c