]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp1: spl: Update optee_get_reserved_memory() return value
authorPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 11 Jun 2024 09:52:39 +0000 (11:52 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 14 Jun 2024 11:25:06 +0000 (13:25 +0200)
In case node "/reserved-memory/optee" is not found, return -ENOENT
instead of 0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/stm32mp1/spl.c

index 10abbed87f0f5a5512f936c94befd00dc5fedda9..beda69f3359ffea4278d1b29e5d4aa012b592f64 100644 (file)
@@ -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;