lkml.org 
[lkml]   [2022]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: tegra194: Fix PM error handling in tegra_pcie_config_ep
On Thu, Jun 02, 2022 at 07:19:08AM +0400, Miaoqian Lin wrote:
> The pm_runtime_enable() will increase power disable depth.
> if dw_pcie_ep_init() fails, we should use pm_runtime_disable()
> to balance it 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")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>

Applied with Vidya's ack to pci/ctrl/tegra194 for v5.20, thanks!

> ---
> drivers/pci/controller/dwc/pcie-tegra194.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index cc2678490162..d992371a36e6 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1949,6 +1949,7 @@ static int tegra_pcie_config_ep(struct tegra194_pcie *pcie,
> if (ret) {
> dev_err(dev, "Failed to initialize DWC Endpoint subsystem: %d\n",
> ret);
> + pm_runtime_disable(dev);
> return ret;
> }
>
> --
> 2.25.1
>

\
 
 \ /
  Last update: 2022-06-08 23:19    [W:0.045 / U:1.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site