Dinghao Liu dac34dd4ef PCI: tegra: Fix runtime PM imbalance on error
[ 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>
2020-10-01 13:18:07 +02:00
..
2019-07-09 07:24:53 -05:00
2019-09-23 19:16:01 -07:00
2019-07-09 07:24:53 -05:00
2019-09-23 16:10:08 -05:00
2018-10-02 10:14:32 +02:00
2019-09-23 16:10:31 -05:00
2019-05-13 18:34:46 -05:00