On 2025/6/27 19:51, Leo Yan wrote:
diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 4ac65c68bbf44b98db22c3dad2d83a224ce5278e..dd2b4cc7a2b70cf060a3207548fe80e3824c489f 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -480,26 +480,16 @@ static inline bool is_coresight_device(void __iomem *base)
- Returns:
- clk - Clock is found and enabled
*/ static inline struct clk *coresight_get_enable_apb_pclk(struct device *dev) { struct clk *pclk;
- NULL - clock is not found
- ERROR - Clock is found but failed to enable
- int ret;
- pclk = clk_get(dev, "apb_pclk");
- if (IS_ERR(pclk)) {
pclk = clk_get(dev, "apb");
if (IS_ERR(pclk))
return NULL;
Hi,
Here, the function returns NULL, but the caller uses IS_ERR() to check the function return value. Yes, this patch has already been fixed this, and should we split this fix into a separate patch?
Best regards,
Junhao.
- }
- pclk = devm_clk_get_enabled(dev, "apb_pclk");
- if (IS_ERR(pclk))
pclk = devm_clk_get_enabled(dev, "apb");
- ret = clk_prepare_enable(pclk);
- if (ret) {
clk_put(pclk);
return ERR_PTR(ret);
- } return pclk; }