[SPAM] [PATCH 1/3] ram: rk3399: Fix .set_rate_index() error handling

Xavier Drudis Ferran xdrudis at tinet.cat
Mon Jul 4 11:57:01 CEST 2022


El Tue, Jun 21, 2022 at 10:07:27AM +0000, Lee Jones deia:
> Functions pointed to by this op pointer can return non-zero values
> indicating an error.  Ensure any error value is propagated back up the
> call-chain.
> 
> Signed-off-by: Lee Jones <lee.jones at linaro.org>


My board doesn't suffer with the issue resolved by this series,
however I did apply it and nothing regressed.

Tested-by: Xavier Drudis Ferran <xdrudis at tinet.cat>

> ---
>  drivers/ram/rockchip/sdram_rk3399.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
> index c0a06dcaed..0af0fa9e7b 100644
> --- a/drivers/ram/rockchip/sdram_rk3399.c
> +++ b/drivers/ram/rockchip/sdram_rk3399.c
> @@ -3005,7 +3005,9 @@ static int sdram_init(struct dram_info *dram,
>  	params->base.stride = calculate_stride(params);
>  	dram_all_config(dram, params);
>  
> -	dram->ops->set_rate_index(dram, params);
> +	ret = dram->ops->set_rate_index(dram, params);
> +	if (ret)
> +		return ret;
>  
>  	debug("Finish SDRAM initialization...\n");
>  	return 0;
> -- 
> 2.37.0.rc0.104.g0611611a94-goog
> 


More information about the U-Boot mailing list