clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
PATCH 1/1 clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
The devm_clk_hw_get_clk() function doesn't return NULL, it returns error pointers. Update the checking to match.
Fixes 8737ec830ee3 ("clk: qcom: common: Add interconnect clocks support")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/clk/qcom/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/qcom/common.c +2 -2
@@ -277,8 +277,8 @@ static int qcom_cc_icc_register(struct device *dev, icd[i].slave_id = desc->icc_hws[i].slave_id; hws = &desc->clks[desc->icc_hws[i].clk_id]->hw; icd[i].clk =devm_clk_hw_get_clk (dev, hws,"icc" ); -if (!icd[i].clk) -return dev_err_probe (dev, -ENOENT , +if (IS_ERR (icd[i].clk)) +return dev_err_probe (dev,PTR_ERR (icd[i].clk),"(%d) clock entry is null\n" , i); icd[i].name =clk_hw_get_name (hws); }
Signature · 1 line
2.47.2
Quoted 6 lines · Dan Carpenter
The
devm_clk_hw_get_clk()function doesn't return NULL, it returns error pointers. Update the checking to match.Fixes 8737ec830ee3 ("clk: qcom: common: Add interconnect clocks support")Signed-off-by Dan Carpenter <[email protected]>---
thanks!
Reviewed-by Konrad Dybcio <[email protected]>
Konrad
Quoted 9 lines · Dan Carpenter
The
devm_clk_hw_get_clk()function doesn't return NULL, it returns error pointers. Update the checking to match.Fixes 8737ec830ee3 ("clk: qcom: common: Add interconnect clocks support")Signed-off-by Dan Carpenter <[email protected]>--- drivers/clk/qcom/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Imran Shaik <[email protected]>
Thanks,
Imran
Quoted 4 lines · Dan Carpenter
The
devm_clk_hw_get_clk()function doesn't return NULL, it returns error pointers. Update the checking to match.
Applied, thanks!
[1/1] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
commit: 1e50f5c9965252ed6657b8692cd7366784d60616
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>