From patchwork Sun Jan 28 20:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10187961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58F476056A for ; Sun, 28 Jan 2018 20:23:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47DD32870C for ; Sun, 28 Jan 2018 20:23:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C8B42870D; Sun, 28 Jan 2018 20:23:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A25432870E for ; Sun, 28 Jan 2018 20:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=soIgaLwqXBJ+yJxWg4k3j0NgW7+lwdOEYgVTlqLYKlw=; b=o46uLtho6YZJOivkX7jnNqeR3k /Tr3Yg1lJ+Z3UwR4+Og3HDTvE7pVz7jnEOw3fIVB382JNCReTsSjWcI1GcIillD6cORSPAit5nBsa 6/85c/NGYyvtVZm32LfFO+W7zOYhJU8R8tgl7ffZX6pDD3RLtwit1aBz+hF069DAtxfPXo1CFCHkg 8sQ2K+ay9ooEN8XCSwOsNfJmCDu+QOHg1qTtzJhEkpruSscvTqwlicYA2sVi5RxNT3YujS3nxQ3oR /GIJz6JLcqvfisWh/BC1P/TiOUwKbi4e2OrCX1GTUT+nvMscRQL3GHAbcn4cpQ0qSHEm4xWYiCkI1 Z1kO4IGg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eftUF-00080y-P9; Sun, 28 Jan 2018 20:23:35 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eftUB-0007vk-PK for linux-amlogic@lists.infradead.org; Sun, 28 Jan 2018 20:23:33 +0000 Received: by mail-wr0-x243.google.com with SMTP id g21so5006680wrb.13 for ; Sun, 28 Jan 2018 12:23:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h8HqR8URzJtjeBln8h9WLdamLVwPuBYPWZE366zppkM=; b=ho3J4+36YtElcyb7TOLfitN9AiuveIQcRtoOjxtBWfpED5NDs6aBMD6TEnfq9Ej4gj 9giVGv7w0EvaO3YR+NKcYAINw9T8ZAEmtENnv/DtnV1F33FReGWufMI5p5vxn1m4MRkW XmDQMgWrn7CE7HRUv2l/RzInmeqvYR82AAUDIzDONSr0f52UV6E21265JdyNli9E8xRk gnYwFnPNgdA5Wv6EyyVEK6oi93o6fyPgIvC+vM0sxmSyMVfI/vhYynnv08KwT6Np1XsP 1usPwR0l8pu2ALyTJG6EhcWx9M1lx/LXKuuv6PDDPuIWO/HUX+guVZHJV2lfa1vCkgMW nITA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h8HqR8URzJtjeBln8h9WLdamLVwPuBYPWZE366zppkM=; b=EpozjBh+uS1G8Dt6zOh+nlFfjHOsdDVfIKvOnj9sjYAA/Fp1VPGdi/Yhkg8BoBFWQq bg5dCmpazAl+ryzyUGfpi6Jmo6mOrSW30XlXnmu76ufa6mxIarUC6zZUCI5RQp4L9mxL MtrzQMuE8xaJfLLGb80PPSPKHPKj/XbiXIEzj0iEQSMKkefYd0gIKLsZpzXyLVEad+dy r4gKNzCYM97ksN64s/9SJOxfvkebfZK8lTAP2EYDsojnd8bQ3F/OqXfvaVzw8qLdqqOm VIZHv9G6nni+vURK26YBdh1Iq0HqmE58Px118e8nCgtbeZWP5K0juIDaGStApOicUnAS 5z0g== X-Gm-Message-State: AKwxytfbR4Vd29xDaeSugOAtX/tHaWBqMG0rEuzAfcCGTMqNg0pya3wR es16SzFSq9BYD9OBHDfoFq0= X-Google-Smtp-Source: AH8x227WIagctfeDDhDoDb1bQnEqnBdNywx5x7yAwVVZISi1ZD+NtD8lECMsNgqkFRwocKDAZatLOQ== X-Received: by 10.223.187.20 with SMTP id r20mr18499758wrg.115.1517171001378; Sun, 28 Jan 2018 12:23:21 -0800 (PST) Received: from blackbox.darklights.net (p5DD9B288.dip0.t-ipconnect.de. [93.217.178.136]) by smtp.googlemail.com with ESMTPSA id f8sm5687369wmc.3.2018.01.28.12.23.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jan 2018 12:23:20 -0800 (PST) From: Martin Blumenstingl To: robh+dt@kernel.org, mark.rutland@arm.com, kishon@ti.com, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 4/5] phy: amlogic: phy-meson-gxl-usb2: don't log an error on -EPROBE_DEFER Date: Sun, 28 Jan 2018 21:22:44 +0100 Message-Id: <20180128202245.25021-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180128202245.25021-1-martin.blumenstingl@googlemail.com> References: <20180128202245.25021-1-martin.blumenstingl@googlemail.com> X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , khilman@baylibre.com, yixun.lan@amlogic.com, carlo@caione.org, jbrunet@baylibre.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP devm_phy_create can return -EPROBE_DEFER if the phy-supply is not ready yet. Silence this warning as the driver framework will re-attempt registering the PHY - this second try works without any errors. So only log actual errors to keep the kernel log free of misleading error messages. Signed-off-by: Martin Blumenstingl --- drivers/phy/amlogic/phy-meson-gxl-usb2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c index ee3c2c0c8572..f062fc7f0a3a 100644 --- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c +++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c @@ -240,6 +240,7 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) struct phy_meson_gxl_usb2_priv *priv; struct phy *phy; void __iomem *base; + int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -275,8 +276,11 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) phy = devm_phy_create(dev, NULL, &phy_meson_gxl_usb2_ops); if (IS_ERR(phy)) { - dev_err(dev, "failed to create PHY\n"); - return PTR_ERR(phy); + ret = PTR_ERR(phy); + if (ret != -EPROBE_DEFER) + dev_err(dev, "failed to create PHY\n"); + + return ret; } phy_set_drvdata(phy, priv);