* [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
@ 2025-09-02 6:33 Dan Carpenter
2025-09-02 10:10 ` Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-09-02 6:33 UTC (permalink / raw)
To: Varadarajan Narayanan
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, linux-arm-msm,
linux-clk, linux-kernel, kernel-janitors
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 <dan.carpenter@linaro.org>
---
drivers/clk/qcom/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 37c3008e6c1b..121591886774 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -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);
}
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
2025-09-02 6:33 [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register() Dan Carpenter
@ 2025-09-02 10:10 ` Konrad Dybcio
2025-09-02 16:46 ` Imran Shaik
2025-09-04 14:35 ` Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2025-09-02 10:10 UTC (permalink / raw)
To: Dan Carpenter, Varadarajan Narayanan
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, linux-arm-msm,
linux-clk, linux-kernel, kernel-janitors
On 9/2/25 8:33 AM, Dan Carpenter wrote:
> 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 <dan.carpenter@linaro.org>
> ---
thanks!
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
2025-09-02 6:33 [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register() Dan Carpenter
2025-09-02 10:10 ` Konrad Dybcio
@ 2025-09-02 16:46 ` Imran Shaik
2025-09-04 14:35 ` Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Imran Shaik @ 2025-09-02 16:46 UTC (permalink / raw)
To: Dan Carpenter, Varadarajan Narayanan
Cc: Bjorn Andersson, Michael Turquette, Stephen Boyd, linux-arm-msm,
linux-clk, linux-kernel, kernel-janitors
On 9/2/2025 12:03 PM, Dan Carpenter wrote:
> 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 <dan.carpenter@linaro.org>
> ---
> drivers/clk/qcom/common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Imran Shaik <imran.shaik@oss.qualcomm.com>
Thanks,
Imran
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register()
2025-09-02 6:33 [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register() Dan Carpenter
2025-09-02 10:10 ` Konrad Dybcio
2025-09-02 16:46 ` Imran Shaik
@ 2025-09-04 14:35 ` Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2025-09-04 14:35 UTC (permalink / raw)
To: Varadarajan Narayanan, Dan Carpenter
Cc: Michael Turquette, Stephen Boyd, linux-arm-msm, linux-clk,
linux-kernel, kernel-janitors
On Tue, 02 Sep 2025 09:33:36 +0300, Dan Carpenter wrote:
> 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,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-04 14:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 6:33 [PATCH] clk: qcom: common: Fix NULL vs IS_ERR() check in qcom_cc_icc_register() Dan Carpenter
2025-09-02 10:10 ` Konrad Dybcio
2025-09-02 16:46 ` Imran Shaik
2025-09-04 14:35 ` Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox