diff mbox series

[-next,1/2] clk: qcom: apcs-msm8916: Use dev_err_probe() helper

Message ID 20220913031756.983224-1-yangyingliang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next,1/2] clk: qcom: apcs-msm8916: Use dev_err_probe() helper | expand

Commit Message

Yang Yingliang Sept. 13, 2022, 3:17 a.m. UTC
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/clk/qcom/apcs-msm8916.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Stephen Boyd Oct. 17, 2022, 9:11 p.m. UTC | #1
Quoting Yang Yingliang (2022-09-12 20:17:55)
> dev_err() can be replace with dev_err_probe() which will check if error
> code is -EPROBE_DEFER.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

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);