diff --git a/common/spl/spl.c b/common/spl/spl.c
index 462c3a2b973be119f57d46f9e1303d2d62537d4a..a3808a988b3c5b63ebb3669d9f81432dcc350ed1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -183,7 +183,12 @@ int spl_init(void)
 	int ret;
 
 	debug("spl_init()\n");
-#if defined(CONFIG_SYS_MALLOC_F_LEN)
+/*
+ * with CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN we set malloc_base and
+ * malloc_limit in spl_relocate_stack_gd
+ */
+#if defined(CONFIG_SYS_MALLOC_F_LEN) && \
+	!defined(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN)
 #ifdef CONFIG_MALLOC_F_ADDR
 	gd->malloc_base = CONFIG_MALLOC_F_ADDR;
 #endif