Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp372528ybk; Fri, 15 May 2020 03:01:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbiLQF7SzbVY7B5k68TaBUSfxVFF3Q5/DdvjoI2CrhOZxtDlbAbIO+ZjA9KpdXIuVuNL3j X-Received: by 2002:a17:906:7282:: with SMTP id b2mr1992381ejl.161.1589536888556; Fri, 15 May 2020 03:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589536888; cv=none; d=google.com; s=arc-20160816; b=DSkqxZxAL8PbNNC8KIwnVs6YXq3l04iR0PDsGDSVQ6wVFG+ZogUwzftGPyODGZbYnB 9VA3RXqZggre1OhJii38e1XTY/16/J8qP5PD8qzE9qD/JIPzBWTDTDTW39EwhnKFrvJm +XLTnq4reMEEBv60CkBeA20t0Qul3A1qFD14RsN2KjvujNrTfbIav3yubcZeZ0pbEiw1 l6YvD2kUo0EpRq+CArFC0mRdtb7F8+7xTtWDRojJJYnTceKALpV9Owy3arb7SHR6BStJ dymKrMGGUk4ytJMRDOK/c1m1I3Yj8SGb8oA3+70bomkzX8EA1tNkCzZ/8sXA0iYzHMql JGNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=2G2DCDZAPtlFRl/x8XCHoKX8jwVAxDFG56uhntYc9OU=; b=RA6u6PCLFSL3+vPnB70FsUGHNTCc6KO2E0Irz0pqRSvH+ZtvR0XgtVGzkPlx0xJRVf vZcdJXdOKAdn1ZX01i4J0SdtvPmAGfuQNR8vbeihSecAYWk6NQD5TPiXidz7JXrkmntc LgBeMdLO791b479rrjJ81GHNfLUScSyg2kMDhg2u6sQKtzGFscSmvPz4pQbtflXAg8Hb Jc6tHjmyepd++hKmdT0jzU5CF/Iosf31j61cTV3wtjIpuvZq8T7VangIlP16n1bbQMpp bshPQOwymo6oBRfr/ESAF3OPGR4j7D149vlpDZR7GhA0otyxmm0enmIVFKEwIHilkOxw 2C/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l30si976856edj.293.2020.05.15.03.01.05; Fri, 15 May 2020 03:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728101AbgEOJ70 (ORCPT + 99 others); Fri, 15 May 2020 05:59:26 -0400 Received: from mx.socionext.com ([202.248.49.38]:29854 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728237AbgEOJ7X (ORCPT ); Fri, 15 May 2020 05:59:23 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 15 May 2020 18:59:21 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 1CCCB60057; Fri, 15 May 2020 18:59:22 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 15 May 2020 18:59:22 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 646E11A12D0; Fri, 15 May 2020 18:59:21 +0900 (JST) From: Kunihiko Hayashi To: Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Rob Herring , Masahiro Yamada Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH v2 5/5] PCI: uniphier: Add error message when failed to get phy Date: Fri, 15 May 2020 18:59:03 +0900 Message-Id: <1589536743-6684-6-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589536743-6684-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1589536743-6684-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Even if phy driver doesn't probe, the error message can't be distinguished from other errors. This displays error message caused by the phy driver explicitly. Signed-off-by: Kunihiko Hayashi --- drivers/pci/controller/dwc/pcie-uniphier.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c index 493f105..7ae9688 100644 --- a/drivers/pci/controller/dwc/pcie-uniphier.c +++ b/drivers/pci/controller/dwc/pcie-uniphier.c @@ -468,8 +468,11 @@ static int uniphier_pcie_probe(struct platform_device *pdev) return PTR_ERR(priv->rst); priv->phy = devm_phy_optional_get(dev, "pcie-phy"); - if (IS_ERR(priv->phy)) - return PTR_ERR(priv->phy); + if (IS_ERR(priv->phy)) { + ret = PTR_ERR(priv->phy); + dev_err(dev, "Failed to get phy (%d)\n", ret); + return ret; + } platform_set_drvdata(pdev, priv); -- 2.7.4