[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190823154115.GB28344@e121166-lin.cambridge.arm.com>
Date: Fri, 23 Aug 2019 16:41:15 +0100
From: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To: Vidya Sagar <vidyas@...dia.com>
Cc: bhelgaas@...gle.com, thierry.reding@...il.com,
jonathanh@...dia.com, linux-tegra@...r.kernel.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
kthota@...dia.com, mmaddireddy@...dia.com, sagar.tv@...il.com
Subject: Re: [PATCH] PCI: tegra: Don't print an error on -EPROBE_DEFER
On Fri, Aug 23, 2019 at 08:48:32PM +0530, Vidya Sagar wrote:
> APIs like devm_regulator_get() and devm_phy_get() have the potential to
> return -EPROBE_DEFER when the respective sub-systems are not ready yet.
> So avoid printing an error message as .probe() will be tried out again
> at a later point of time anyway.
>
> Signed-off-by: Vidya Sagar <vidyas@...dia.com>
> ---
> drivers/pci/controller/dwc/pcie-tegra194.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
Squashed in pci/tegra, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index fc0dbeb31d78..c730986ed34d 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1368,9 +1368,11 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
>
> pcie->pex_ctl_supply = devm_regulator_get(dev, "vddio-pex-ctl");
> if (IS_ERR(pcie->pex_ctl_supply)) {
> - dev_err(dev, "Failed to get regulator: %ld\n",
> - PTR_ERR(pcie->pex_ctl_supply));
> - return PTR_ERR(pcie->pex_ctl_supply);
> + ret = PTR_ERR(pcie->pex_ctl_supply);
> + if (ret != -EPROBE_DEFER)
> + dev_err(dev, "Failed to get regulator: %ld\n",
> + PTR_ERR(pcie->pex_ctl_supply));
> + return ret;
> }
>
> pcie->core_clk = devm_clk_get(dev, "core");
> @@ -1412,7 +1414,8 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev)
> kfree(name);
> if (IS_ERR(phys[i])) {
> ret = PTR_ERR(phys[i]);
> - dev_err(dev, "Failed to get PHY: %d\n", ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(dev, "Failed to get PHY: %d\n", ret);
> return ret;
> }
> }
> --
> 2.17.1
>
Powered by blists - more mailing lists