Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6060696rwn; Mon, 12 Sep 2022 20:26:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Cle4MK2R1HRIIuWpRcGtTDxxzXNwGJ0D7dHrs1TZtSgj8k8aFFdCwZsuqUeO2hmyTpI80 X-Received: by 2002:a05:6402:26d4:b0:451:280d:3533 with SMTP id x20-20020a05640226d400b00451280d3533mr13798066edd.316.1663039568272; Mon, 12 Sep 2022 20:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663039568; cv=none; d=google.com; s=arc-20160816; b=vwdt5OEwVg1UZ7B8sOR1Hksnz+rhQkBXiky8nh9E3/J+DJpxH4tBwKg2LtHvC+4Ez/ EFxEM9YSYbaww5YG7OEg5p/uqpsqVF2rZ60e6YTGoTsuVKeOnWSZcmvpSphx/j/8j58L bobQ1kV1j6RQwpXrqQS7kAf15S4UMnhaaX3BhnGMLwOj3PO5QsjYPLRhIoyzYUB0nuCP 9Hxiim2f1IDCFykarmjTUNnRSFUdAVzoruRG3U8R0vQZacLamoaIunWRpMXPHBAYpPbX veXfLxqma437UqZy2BccRnVNt8mlBLDFF5QdlvVd7Xaj4W3j646NE57ZMGK9AEwvxOOO ANSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5YyFIA7jcW0bgDOu9/EHd79lmC7+0J+JJufVhkR5siU=; b=H79CX7sJV+9LxUHfcL55u+oOqpXq5aKxzLNsYupRgNAPZ2L3sB1W0h2TbaTPVr7ffU +1E9wI+qyxavxwIpaw8YIbyh18jUOsWB2/kLh7ti2nc0ehR6y5l5oQYBv1oqF/XpfZPb +KaBeNb5nnaWokS+I5IGb0crihQtnQQlZdaJ2k5Qf5i9YlVUx2aUAsaO+7jYGtnKkk8y D6W6uNNwUPST/lIoEoksBt7FCvpvhK53gPhw70HnAXtuMGeZ3eOzbVLcZu7HSvmwnu1t lVX+BEm0vzPFLsFC5+eN7/QcNA6Sjsve7OzF6d3oHexXJZnYVHGG5esmLB630GBttH+p bAag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd37-20020a1709076e2500b0077c802880basi5190810ejc.47.2022.09.12.20.25.39; Mon, 12 Sep 2022 20:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229607AbiIMDHc (ORCPT + 99 others); Mon, 12 Sep 2022 23:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229906AbiIMDH1 (ORCPT ); Mon, 12 Sep 2022 23:07:27 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D0F14F699; Mon, 12 Sep 2022 20:07:26 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MRSwD6mzxzmVNc; Tue, 13 Sep 2022 11:03:40 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 13 Sep 2022 11:07:24 +0800 Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 13 Sep 2022 11:07:23 +0800 From: Yang Yingliang To: , , CC: , Subject: [PATCH -next] clk: clocking-wizard: Use dev_err_probe() helper Date: Tue, 13 Sep 2022 11:14:42 +0800 Message-ID: <20220913031442.980720-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang --- drivers/clk/xilinx/clk-xlnx-clock-wizard.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c index 5b8433468cc5..eb1dfe7ecc1b 100644 --- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c +++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c @@ -448,18 +448,14 @@ static int clk_wzrd_probe(struct platform_device *pdev) } clk_wzrd->clk_in1 = devm_clk_get(&pdev->dev, "clk_in1"); - if (IS_ERR(clk_wzrd->clk_in1)) { - if (clk_wzrd->clk_in1 != ERR_PTR(-EPROBE_DEFER)) - dev_err(&pdev->dev, "clk_in1 not found\n"); - return PTR_ERR(clk_wzrd->clk_in1); - } + if (IS_ERR(clk_wzrd->clk_in1)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk_wzrd->clk_in1), + "clk_in1 not found\n"); clk_wzrd->axi_clk = devm_clk_get(&pdev->dev, "s_axi_aclk"); - if (IS_ERR(clk_wzrd->axi_clk)) { - if (clk_wzrd->axi_clk != ERR_PTR(-EPROBE_DEFER)) - dev_err(&pdev->dev, "s_axi_aclk not found\n"); - return PTR_ERR(clk_wzrd->axi_clk); - } + if (IS_ERR(clk_wzrd->axi_clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk_wzrd->axi_clk), + "s_axi_aclk not found\n"); ret = clk_prepare_enable(clk_wzrd->axi_clk); if (ret) { dev_err(&pdev->dev, "enabling s_axi_aclk failed\n"); -- 2.25.1