From patchwork Mon Mar 7 04:32:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 8515461 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FD9FC0553 for ; Mon, 7 Mar 2016 04:40:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 471B72013A for ; Mon, 7 Mar 2016 04:40:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D08B200FF for ; Mon, 7 Mar 2016 04:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbcCGEkm (ORCPT ); Sun, 6 Mar 2016 23:40:42 -0500 Received: from lucky1.263xmail.com ([211.157.147.132]:49801 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751975AbcCGEkl (ORCPT ); Sun, 6 Mar 2016 23:40:41 -0500 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.129]) by lucky1.263xmail.com (Postfix) with SMTP id DA32C6051F; Mon, 7 Mar 2016 12:40:35 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id E491312849; Mon, 7 Mar 2016 12:40:33 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: m-karicheri2@ti.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 42800YBNSS; Mon, 07 Mar 2016 12:40:34 +0800 (CST) From: Shawn Lin To: Murali Karicheri , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Lin Subject: [PATCH] PCI/keystone: check return value of devm_phy_get with EPROBE_DEFER Date: Mon, 7 Mar 2016 12:32:21 +0800 Message-Id: <1457325141-1354-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the return value of devm_phy_get is EPROBE_DEFER, we should defer probing the driver. Signed-off-by: Shawn Lin --- 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 */