From patchwork Tue Sep 13 03:17:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12974300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3E82C6FA82 for ; Tue, 13 Sep 2022 03:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5EuMbPXa7ccryPtyxG3/VUTkLbbWtW7ailmvuYoeOlE=; b=cu0PYzm/ZNkMXz xIfSdDffrrRCqjK2c9lCw2a2HlDxObvPiOd469Kw+d9f4MITBT1LB3vQc619gUdeSl0WHKq66Ok+9 guKn2juAAQOOZL1EJA52ZRcXSq6IuTAzadHJgxW9qmbfM7SDpWVBtMg4/wZvMx6Jo2hCASrIc0baS DIBassdVNiZjApGltK3l+weTjcTa5AGw12cbCUC4Jh9yyIvw3/yxbtucU/SErxuEP9bFkxqc8NUFS AGCAp54Pj8gbbGRKkon8WiBIUCyWa6qOIY3WNfu1UX46N0BoJmo38vlRcJmsgrcCs9DGjkllMcKmj I9kB2L57vNS0OQ7RUB4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXwKT-000oRM-IG; Tue, 13 Sep 2022 03:11:17 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXwK8-000oDb-LL for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 03:11:04 +0000 Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MRT0053MJzlVqP; Tue, 13 Sep 2022 11:06:56 +0800 (CST) Received: from dggpemm500007.china.huawei.com (7.185.36.183) by dggpemm500022.china.huawei.com (7.185.36.162) 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:10:52 +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:10:52 +0800 From: Yang Yingliang To: , , CC: , , Subject: [PATCH -next 2/2] clk: qcom: clk-spmi-pmic-div: Use dev_err_probe() helper Date: Tue, 13 Sep 2022 11:17:56 +0800 Message-ID: <20220913031756.983224-2-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913031756.983224-1-yangyingliang@huawei.com> References: <20220913031756.983224-1-yangyingliang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220912_201102_129242_4777D519 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org dev_err() can be replace with dev_err_probe() which will check if error code is -EPROBE_DEFER. Signed-off-by: Yang Yingliang Reviewed-by: Stephen Boyd --- drivers/clk/qcom/clk-spmi-pmic-div.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/clk-spmi-pmic-div.c b/drivers/clk/qcom/clk-spmi-pmic-div.c index f2cf55cee2fd..10b8d19d0662 100644 --- a/drivers/clk/qcom/clk-spmi-pmic-div.c +++ b/drivers/clk/qcom/clk-spmi-pmic-div.c @@ -237,12 +237,9 @@ static int spmi_pmic_clkdiv_probe(struct platform_device *pdev) cc->nclks = nclks; cxo = clk_get(dev, "xo"); - if (IS_ERR(cxo)) { - ret = PTR_ERR(cxo); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get xo clock\n"); - return ret; - } + if (IS_ERR(cxo)) + return dev_err_probe(dev, PTR_ERR(cxo), + "failed to get xo clock\n"); cxo_hz = clk_get_rate(cxo); clk_put(cxo);