aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones2022-08-11 08:58:46 +0100
committerKever Yang2022-09-04 20:00:38 +0800
commit7b561e2ab8ac980023c5e5325f45a8ca1951c0dd (patch)
tree40d7e939e277f3fe80517a6bc14436182c8e4ffc
parentfc1526f651a557ddbf7c3cba8575be963573871f (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.c4
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;