From: Lee Jones Date: Thu, 11 Aug 2022 07:58:46 +0000 (+0100) Subject: ram: rk3399: Fix .set_rate_index() error handling X-Git-Tag: v2025.01-rc5-pxa1908~1293^2~16 X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=7b561e2ab8ac980023c5e5325f45a8ca1951c0dd;p=u-boot.git ram: rk3399: Fix .set_rate_index() error handling 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 Tested-by: Xavier Drudis Ferran Reviewed-by: Kever Yang --- diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 8b4d525292..5faff39641 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;