lkml.org 
[lkml]   [2022]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/2] clk: qcom: clk-spmi-pmic-div: Use dev_err_probe() helper
Date
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/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);

--
2.25.1
\
 
 \ /
  Last update: 2022-09-13 05:12    [W:0.048 / U:3.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site