[PATCH 04/24] clk: thead: th1520-ap: Remove negative error returns from clk_get_rate
    Yao Zi 
    ziyao at disroot.org
       
    Thu Oct 16 06:53:40 CEST 2025
    
    
  
On Wed, Oct 15, 2025 at 03:32:09PM +0100, Andrew Goodbody wrote:
> 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/thead/clk-th1520-ap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
I want to switch to ccf_clk_* in the future, but this patch looks good
to me as a fix alone.
Acked-by: Yao Zi <ziyao at disroot.org>
Tested on Lichee Pi 4A board with no regression found.
Best regards,
Yao Zi
> diff --git a/drivers/clk/thead/clk-th1520-ap.c b/drivers/clk/thead/clk-th1520-ap.c
> index 6899e1b595a7148a118d3a615d5dfea4b4fb5b96..e913621967eb131b534e8f5b928687967a02a30e 100644
> --- a/drivers/clk/thead/clk-th1520-ap.c
> +++ b/drivers/clk/thead/clk-th1520-ap.c
> @@ -985,7 +985,7 @@ static ulong th1520_clk_get_rate(struct clk *clk)
>  
>  	ret = clk_get_by_id(clk->id, &c);
>  	if (ret)
> -		return ret;
> +		return 0;
>  
>  	return clk_get_rate(c);
>  }
> 
> -- 
> 2.47.3
> 
    
    
More information about the U-Boot
mailing list