diff options
author | Lee Jones <lee@kernel.org> | 2022-08-11 10:58:46 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2022-09-04 15:00:38 +0300 |
commit | 7b561e2ab8ac980023c5e5325f45a8ca1951c0dd (patch) | |
tree | 40d7e939e277f3fe80517a6bc14436182c8e4ffc /drivers/ram/rockchip | |
parent | fc1526f651a557ddbf7c3cba8575be963573871f (diff) | |
download | u-boot-7b561e2ab8ac980023c5e5325f45a8ca1951c0dd.tar.xz |
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 <lee@kernel.org>
Tested-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'drivers/ram/rockchip')
-rw-r--r-- | drivers/ram/rockchip/sdram_rk3399.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |