linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/keystone: check return value of devm_phy_get with EPROBE_DEFER
@ 2016-03-07  4:32 Shawn Lin
  2016-03-11 18:38 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Lin @ 2016-03-07  4:32 UTC (permalink / raw)
  To: Murali Karicheri, Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Shawn Lin

If the return value of devm_phy_get is EPROBE_DEFER, we should
defer probing the driver.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/pci/host/pci-keystone.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index 0aa81bd..42af6ac 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -363,6 +363,8 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
 		ret = phy_init(phy);
 		if (ret < 0)
 			return ret;
+	} else if (PTR_ERR(phy) == -EPROBE_DEFER) {
+		return PTR_ERR(phy);
 	}
 
 	/* index 2 is to read PCI DEVICE_ID */
-- 
2.3.7



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-11 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07  4:32 [PATCH] PCI/keystone: check return value of devm_phy_get with EPROBE_DEFER Shawn Lin
2016-03-11 18:38 ` Bjorn Helgaas
2016-03-11 23:33   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).