From patchwork Thu Feb 4 13:36:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 12067335 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 E4C64C433DB for ; Thu, 4 Feb 2021 13:37:25 +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 A031364F10 for ; Thu, 4 Feb 2021 13:37:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A031364F10 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=cggRwrt1w2BNb0xh+OxuXvJbl1FAr66V5sp0SmqaQtU=; b=vO5++km7mi+YlTBO9JdtXYY2h6 oeIdwB7B5Pc/fx8dGrYcfcYRDhMACg6iBxB5Mm1CKqQSxx5XkBcK6dJPnHSj72/2AwW+3xoNTyMd7 7syC7JakGtR27We+K3gSvL695MuMSMJOVG8VBOrBixMOIGNnLxf6wQs64suhAzs/h0Bz8fR2pMKOF uiSgaFbI4mCFl4DCebAVL7PLIBAvYB5mWKzFaIt7Q3vWbscc4iKWqcz1udZRI6NOJxYTAJ73QmEon +lYuQeYp7R8sKra9eVMICodMwByIMumfsVASA/WwL7CvFnO3kaFIzpT6bSIc/PRiu+/qC+q/G3Jmz zYhPozZg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7enw-00075Y-L9; Thu, 04 Feb 2021 13:36:16 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7enu-00074v-To for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 13:36:15 +0000 Received: by mail-wr1-x430.google.com with SMTP id l12so3562316wry.2 for ; Thu, 04 Feb 2021 05:36:14 -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=2wNLIUP4Xf17KhdjtkEwog/CXYEKOouf43hiUeEcDII=; b=Acq3HeMCg6A4IzKWo9Z8JsiKOLxtAiJP8UkpXJL3y3R0x2pfLlYRYei2qibzM+vEGG I3QtwSwf+60HVR3isI6kiGY/lINuuOsSUbi8rFsn8bl83va0jOTvn+BmHkUBwViPVKes HgeKhzIGlGpj3tvhVipCPTy1v0sDKmKcPSivTZo01uEcWYkbBM9AoPxsPoMNLg1pcyIJ QWwunVoC7diVVldqj6/Pj3ocxCpWP16uIqy4Phd0T0qzYP0NE7OzOvhjOePq5XglKtHD J+k3PuwqSashd6tuvX8AH+IlqoKmJ7lrd0dVRxMkeBMMxz1B2gLXSa1viXPc6HuAjLIW +DtQ== 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=2wNLIUP4Xf17KhdjtkEwog/CXYEKOouf43hiUeEcDII=; b=s3gYxeKb7Ytlf9NMg6RIT7NWExjx51sB9YlNoAmYlBeDhaMiqo7vMQ8aunndLAnYcL MKfybxXMrRMFn2lC1ypJwzCpAYklDqJvfN5xMrhauXCj4HDnfGpB5eg08IZ9Wk1PgTHq 2lOgaI/B84K1JTRzx2u2BqJNLzzs+BgWIBl7Cadjy9OVLNB5tgf4xG57YqS+pOsH02O1 mCiNVPF2oYzDDwdWF9z86EVY5xxwZ4E3dDgxJ0QOK5ynflbz7BXBH80j8tSP0sCUJTD0 z4pt3kEHpaMFkJ/rDJBbodeh9+3LNAYlE4qgVJgF9vFU0zkeo8JnFlePZv7V86z4rWBz SN9g== X-Gm-Message-State: AOAM532iJHKfQuRaN+MHo09NwnvgKXRg0vteGwr2x1zVvKdfEbjyREzZ /PPBhnotp2EDIc1S+snB0z+iqQ== X-Google-Smtp-Source: ABdhPJz2G4W8/09FQulizSxZSffq8RFw/WyNnPD/E6nEF9+KBGabmxW9VIK0Pbljn9oDZPUqGM9ayw== X-Received: by 2002:a5d:49cf:: with SMTP id t15mr9252884wrs.217.1612445773300; Thu, 04 Feb 2021 05:36:13 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id c62sm6212065wmd.43.2021.02.04.05.36.12 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Feb 2021 05:36:12 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH] fpga: xilinx-pr-decoupler: Simplify code by using dev_err_probe() Date: Thu, 4 Feb 2021 14:36:11 +0100 Message-Id: <666708105c25ae5fa7bb23b5eabd7d12fe9cb1b3.1612445770.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_083614_986243_6F41C886 X-CRM114-Status: GOOD ( 12.62 ) 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: Tom Rix , linux-fpga@vger.kernel.org, Moritz Fischer , linux-arm-kernel@lists.infradead.org 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/fpga/xilinx-pr-decoupler.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/fpga/xilinx-pr-decoupler.c b/drivers/fpga/xilinx-pr-decoupler.c index 7d69af230567..b0eaf26af6e7 100644 --- a/drivers/fpga/xilinx-pr-decoupler.c +++ b/drivers/fpga/xilinx-pr-decoupler.c @@ -100,11 +100,9 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev) return PTR_ERR(priv->io_base); priv->clk = devm_clk_get(&pdev->dev, "aclk"); - if (IS_ERR(priv->clk)) { - if (PTR_ERR(priv->clk) != -EPROBE_DEFER) - dev_err(&pdev->dev, "input clock not found\n"); - return PTR_ERR(priv->clk); - } + if (IS_ERR(priv->clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk), + "input clock not found\n"); err = clk_prepare_enable(priv->clk); if (err) {