From: Shawn Lin <shawn.lin@rock-chips.com>
To: Murali Karicheri <m-karicheri2@ti.com>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH] PCI/keystone: check return value of devm_phy_get with EPROBE_DEFER
Date: Mon, 7 Mar 2016 12:32:21 +0800 [thread overview]
Message-ID: <1457325141-1354-1-git-send-email-shawn.lin@rock-chips.com> (raw)
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
next reply other threads:[~2016-03-07 4:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 4:32 Shawn Lin [this message]
2016-03-11 18:38 ` Bjorn Helgaas
2016-03-11 23:33 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457325141-1354-1-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®