lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190823151832.14427-1-vidyas@nvidia.com>
Date:   Fri, 23 Aug 2019 20:48:32 +0530
From:   Vidya Sagar <vidyas@...dia.com>
To:     <lorenzo.pieralisi@....com>, <bhelgaas@...gle.com>,
        <thierry.reding@...il.com>, <jonathanh@...dia.com>
CC:     <linux-tegra@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <kthota@...dia.com>,
        <mmaddireddy@...dia.com>, <vidyas@...dia.com>, <sagar.tv@...il.com>
Subject: [PATCH] PCI: tegra: Don't print an error on -EPROBE_DEFER

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(-)

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ