PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep()
[ Upstream commite8fbd344a5
] 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:c57247f940
("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
880ece912b
commit
0a5d731841
@ -1949,6 +1949,7 @@ static int tegra_pcie_config_ep(struct tegra194_pcie *pcie,
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to initialize DWC Endpoint subsystem: %d\n",
|
dev_err(dev, "Failed to initialize DWC Endpoint subsystem: %d\n",
|
||||||
ret);
|
ret);
|
||||||
|
pm_runtime_disable(dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user