PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep()
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 2 Jun 2022 03:19:08 +0000 (07:19 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:40 +0000 (14:23 +0200)
commit879bcbbec3e0da462b156166a3c221a7e588bcc8
tree7aa4b35268f29a6aedb76069a9ddeaef62c51e32
parentc0ad5c7e68d10f6f8ffb0f4329e3c19404fbca58
PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep()

[ Upstream commit e8fbd344a5ea62663554b8546b6bf9f88b93785a ]

pm_runtime_enable() will increase power disable depth.  If
dw_pcie_ep_init() fails, we should use pm_runtime_disable() to balance it
with pm_runtime_enable().

Add missing pm_runtime_disable() for tegra_pcie_config_ep().

Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
Link: https://lore.kernel.org/r/20220602031910.55859-1-linmq006@gmail.com
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-tegra194.c