[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220913031756.983224-1-yangyingliang@huawei.com>
Date: Tue, 13 Sep 2022 11:17:55 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-kernel@...r.kernel.org>, <linux-clk@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>
CC: <agross@...nel.org>, <andersson@...nel.org>, <sboyd@...nel.org>
Subject: [PATCH -next 1/2] clk: qcom: apcs-msm8916: Use dev_err_probe() helper
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
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);
--
2.25.1
Powered by blists - more mailing lists