Re: [PATCH 10/24] clk: starfive: Remove negative error returns from clk_get_rate

Hal Feng <[email protected]> Fri, 17 Oct 2025 06:16:25 +0000
Newsgroups io.groups.u-boot-amlogic,org.u-boot-project.lists.u-boot
Message-ID <ZQ2PR01MB1307D6856E5DEB84C846F4DAE6F62@ZQ2PR01MB1307.CHNPR01.prod.partner.outlook.cn>
> On 15.10.25 22:32, 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 <[email protected]>

Reviewed-by: Hal Feng <[email protected]>

Best regards,
Hal Feng

> ---
>  drivers/clk/starfive/clk-jh7110-pll.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/starfive/clk-jh7110-pll.c b/drivers/clk/starfive/clk-
> jh7110-pll.c
> index
> f8af17227c502a39cc8f4b77f52a3d88fed210a9..12dd14c02c683bb860743
> bcb994b549e7a8f74bb 100644
> --- a/drivers/clk/starfive/clk-jh7110-pll.c
> +++ b/drivers/clk/starfive/clk-jh7110-pll.c
> @@ -292,7 +292,7 @@ static ulong jh7110_pllx_recalc_rate(struct clk *clk)
>  	else if (dacpd == 0 && dsmpd == 0)
>  		do_div(frac, 1 << 24);
>  	else
> -		return -EINVAL;
> +		return 0;
> 
>  	refclk *= (fbdiv + frac);
>  	do_div(refclk, prediv * postdiv1);
> 
> --
> 2.47.3