[PATCH 18/24] clk: mediatek: Remove negative error returns from clk_get_rate
    Andrew Goodbody 
    andrew.goodbody at linaro.org
       
    Wed Oct 15 16:32:23 CEST 2025
    
    
  
clk_get_rate() returns a ulong so do not attempt to pass negative error
codes through it.
Signed-off-by: Andrew Goodbody <andrew.goodbody at linaro.org>
---
 drivers/clk/mediatek/clk-mtk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index f91777e968a63477c4e75872af632a6b7c855c51..75ae9787d4469e6a40d1437d245d0e9d79b22bf7 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -725,7 +725,7 @@ static ulong mtk_clk_gate_get_rate(struct clk *clk)
 	const struct mtk_gate *gate;
 
 	if (id < priv->tree->gates_offs)
-		return -EINVAL;
+		return 0;
 
 	gate = &priv->gates[id - priv->tree->gates_offs];
 	/*
-- 
2.47.3
    
    
More information about the U-Boot
mailing list