diff mbox series

[next,RFC,2/5] ram: rk3399: fail probe if DRAM init failed

Message ID 20241105-rk3399-dram-init-v1-2-1e29acdf0966@cherry.de
State New
Delegated to: Kever Yang
Headers show
Series rockchip: panic() when DRAM init fails | expand

Commit Message

Quentin Schulz Nov. 5, 2024, 5:21 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

We should fail the probe of the DRAM device if the DRAM init failed so
let's return a negative error-code if rk3399_dmc_init returns non-zero.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 drivers/ram/rockchip/sdram_rk3399.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 63d7852555cea3296b7cd9eed422c4d5d1c9776b..5a82c7ccbdf161526f0d1450dde6881441e59543 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -3157,7 +3157,7 @@  static int rk3399_dmc_probe(struct udevice *dev)
 	priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF);
 	debug("%s: pmugrf = %p\n", __func__, priv->pmugrf);
 	if (phase_sdram_init() && rk3399_dmc_init(dev))
-		return 0;
+		return -EINVAL;
 
 	/*
 	 * There is no point in checking the SDRAM size in TPL as it is not