[PATCH 2/2] stm32mp1: spl: Update optee_get_reserved_memory() return value

Patrice Chotard patrice.chotard at foss.st.com
Tue Jun 11 11:52:39 CEST 2024


In case node "/reserved-memory/optee" is not found, return -ENOENT
instead of 0.

Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
---

 arch/arm/mach-stm32mp/stm32mp1/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/stm32mp1/spl.c b/arch/arm/mach-stm32mp/stm32mp1/spl.c
index 10abbed87f0..beda69f3359 100644
--- a/arch/arm/mach-stm32mp/stm32mp1/spl.c
+++ b/arch/arm/mach-stm32mp/stm32mp1/spl.c
@@ -118,7 +118,7 @@ static int optee_get_reserved_memory(uint32_t *start, uint32_t *size)
 
 	node = ofnode_path("/reserved-memory/optee");
 	if (!ofnode_valid(node))
-		return 0;
+		return -ENOENT;
 
 	fdt_start = ofnode_get_addr_size(node, "reg", &fdt_mem_size);
 	*start = fdt_start;
-- 
2.25.1



More information about the U-Boot mailing list