From patchwork Thu Feb 4 13:11:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 12067311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CCA8C433E0 for ; Thu, 4 Feb 2021 13:12:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECBBA64F4A for ; Thu, 4 Feb 2021 13:12:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECBBA64F4A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=47y2ChtPuaARsKPUlq9RlbEneJKlwTlFamPSqpq2kZA=; b=BAV8ibo7fNVlTQtjUE7HgzqU0+ Pdy0AOz+iKwCWLfvKbgHJUNK/BVTPfs/RmoLNAhMT4yXAcGBaddeia4pWLxR4c/EPyTK6uy1cst3r jqmcSqhIhBlNQH8T2n3gd7k7LEV9v/Vz4Q2vN6nDLyo9bEkSzvHG8C58rXB+1GtIL0DMSxQ3I+XeS TKKGhmuscZzfHleL/gyvZ97FepBrldz6fnEoo6uNkzqexxi6KRd9GRTKwhAv4+62hpAwh55WHDonw w3wGrxUT+b06ymEGm7NH2i87ChQzOGpX44nNwP8pB0wMM2t8yiOCL2razULjZS84mZimTaVmUNQ9r g4GVanPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7eQH-0005gO-AJ; Thu, 04 Feb 2021 13:11:49 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7eQE-0005fy-3H for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 13:11:47 +0000 Received: by mail-wm1-x335.google.com with SMTP id j21so238941wmj.0 for ; Thu, 04 Feb 2021 05:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XHpCqY3+e6XVnsv3h2zCtkKd/6jd0Ce4KQqnlJfkPlk=; b=L8rxkW6o4Wy+af+1cYbNPRz3rEV8RELj5QtBMm776nBM2T3hBIbSwDKIJCX66EDA4S cP7ccmorLUb45N1Ze/8KiDzdYKIZNAKpg86O61k/1BA7nuIjz3s4EcKVC0w9zafnfprB T0+FP51YGK0uTKgStYbCAj0C5xivsRE8F3sUJYOZ37Wx0yxlW62uMJ4t7YxdJQtciPi/ gH9tz9jwIs2avXAg+DyPpsz2g+TQzWwW9G2mvnhr2RgzGV5j/4xNK1oT741BJD9CtPSX 7UstaVyy5Kj9726Z1dzNxjOvqeGY10BWM4EJbKU5MlyWPwohcZMEzUQkf4Na1jpeerLX dpBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=XHpCqY3+e6XVnsv3h2zCtkKd/6jd0Ce4KQqnlJfkPlk=; b=ByLiC/C/b0+FFZ2Prvm3XSXI75gbOznw8YLTK5fICLgz8p9JCTHMLyzK9R91O7TxOc 5AeX0ZBUw3Ml26hqgqLEWd1jkmwFSLwY/a5x/agpoTdOhwUt7F9s/8iHrLzh4mOarYNB 4OtyBBF+qLSHh7+syHCt5sfxEN75vq9vWG3uaNRZytkRTO8ySmlsjsoYNEIVDJGp2aRI C0t1xk7lN2YNp5wnba0xNttWztOrtxOuyTTsNmb4qkTawHX+m3oZJDRZ6VRE2xmT7IaS x2JfFHqr2DBuHChK4G+B7ijS2ra7Iig+qfbQV++RuZyFdLo5labyfvdgP2gz4Ul60EAz X2rg== X-Gm-Message-State: AOAM532c44W3SpYXI5FT9ccCxBUn86bmtOtqIikSSoqnJqZXP+Hn2KCt 8zqD1vqrkT6urC6ARI1uaHZZaA== X-Google-Smtp-Source: ABdhPJzDKgsnv+YzL06X+JT1pMgIDNYOASBCRI47Y70DO8HRzoG3qOIKC2nYpWhPHDc0HAwhHlOHvw== X-Received: by 2002:a05:600c:4f48:: with SMTP id m8mr7553017wmq.12.1612444304619; Thu, 04 Feb 2021 05:11:44 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id 62sm6299317wmd.34.2021.02.04.05.11.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Feb 2021 05:11:44 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH] phy: zynqmp: Simplify code by using dev_err_probe() Date: Thu, 4 Feb 2021 14:11:42 +0100 Message-Id: <0df30548f721b10475a6cc5659beda102fec3c87.1612444300.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_081146_186633_76429E02 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vinod Koul , Anurag Kumar Vulisha , Laurent Pinchart , linux-arm-kernel@lists.infradead.org, Kishon Vijay Abraham I Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Signed-off-by: Michal Simek --- drivers/phy/xilinx/phy-zynqmp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/phy/xilinx/phy-zynqmp.c b/drivers/phy/xilinx/phy-zynqmp.c index 2b0f921b6ee3..2b65f84a5f89 100644 --- a/drivers/phy/xilinx/phy-zynqmp.c +++ b/drivers/phy/xilinx/phy-zynqmp.c @@ -874,13 +874,10 @@ static int xpsgtr_get_ref_clocks(struct xpsgtr_dev *gtr_dev) snprintf(name, sizeof(name), "ref%u", refclk); clk = devm_clk_get_optional(gtr_dev->dev, name); - if (IS_ERR(clk)) { - if (PTR_ERR(clk) != -EPROBE_DEFER) - dev_err(gtr_dev->dev, - "Failed to get reference clock %u: %ld\n", - refclk, PTR_ERR(clk)); - return PTR_ERR(clk); - } + if (IS_ERR(clk)) + return dev_err_probe(gtr_dev->dev, PTR_ERR(clk), + "Failed to get reference clock %u\n", + refclk); if (!clk) continue;