From patchwork Tue Sep 13 03:17:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Yingliang X-Patchwork-Id: 12974299 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 8D0C8C6FA82 for ; Tue, 13 Sep 2022 03:12:15 +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: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:In-Reply-To:References: List-Owner; bh=DIf3r1slnR6n4UoXeEECSUnwuUazmWnn2FRyDucHMVc=; b=1QhO8APHRsR+K1 DVm5aUyhWIMgUJGSo2spz5wU0HQpu17A681+6lVh8QCXpStIAGJZd+SqPdKg7hInbfjitQL3JROH7 3rLney66Ho2ZvLt69WhX9nymvjv5vxmbBGRBDZUNC3SS30ZCYwilFo6OTQNrrgBPOByEuq+/IoUwb cSMMJjweN4gUitBIhqskhZnO+s0iZlzLLk3DjZAJIZsdI/TykOuIcgq1BkiMh5GCtc+Zei2ZhV+2J dJH8MdGhAGpIM79uuel4UcKodmeMSzRDYqnEu9Ar6XN+VypT2NhyYmmbD/NDxI5q1mIAE1Mswe1PJ SOx8pWRLJGGy8TtKAjNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXwKI-000oMw-4i; Tue, 13 Sep 2022 03:11:06 +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-000oDt-LK for linux-arm-kernel@lists.infradead.org; Tue, 13 Sep 2022 03:11:03 +0000 Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MRT1S3c5qznVFm; Tue, 13 Sep 2022 11:08:12 +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: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 1/2] clk: qcom: apcs-msm8916: Use dev_err_probe() helper Date: Tue, 13 Sep 2022 11:17:55 +0800 Message-ID: <20220913031756.983224-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 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_106092_EB9EBEF8 X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. 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/apcs-msm8916.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/clk/qcom/apcs-msm8916.c b/drivers/clk/qcom/apcs-msm8916.c index 89e0730810ac..233885236409 100644 --- a/drivers/clk/qcom/apcs-msm8916.c +++ b/drivers/clk/qcom/apcs-msm8916.c @@ -83,12 +83,9 @@ static int qcom_apcs_msm8916_clk_probe(struct platform_device *pdev) a53cc->parent_map = gpll0_a53cc_map; a53cc->pclk = devm_clk_get(parent, NULL); - if (IS_ERR(a53cc->pclk)) { - ret = PTR_ERR(a53cc->pclk); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get clk: %d\n", ret); - return ret; - } + if (IS_ERR(a53cc->pclk)) + return dev_err_probe(dev, PTR_ERR(a53cc->pclk), + "failed to get clk\n"); a53cc->clk_nb.notifier_call = a53cc_notifier_cb; ret = clk_notifier_register(a53cc->pclk, &a53cc->clk_nb); 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);