[PATCH -next 1/2] clk: qcom: apcs-msm8916: Use dev_err_probe() helper
Yang Yingliang
yangyingliang at huawei.com
Mon Sep 12 20:17:55 PDT 2022
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.
Signed-off-by: Yang Yingliang <yangyingliang at huawei.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
More information about the linux-arm-kernel
mailing list