diff options
author | Lee Jones | 2022-08-11 08:58:46 +0100 |
---|---|---|
committer | Kever Yang | 2022-09-04 20:00:38 +0800 |
commit | 7b561e2ab8ac980023c5e5325f45a8ca1951c0dd (patch) | |
tree | 40d7e939e277f3fe80517a6bc14436182c8e4ffc | |
parent | fc1526f651a557ddbf7c3cba8575be963573871f (diff) |
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>
-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 8b4d5252924..5faff396410 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; |