[U-Boot] [PATCH v2 2/7] efi_loader: Change efi_add_memory_map() to return EFI_SUCCESS

Bryan O'Donoghue pure.logic at nexus-software.ie
Sun Jul 14 22:29:26 UTC 2019


efi_add_memory_map() wants to return 0 to indicate success in two places.
Instead of returning zero we should return the defined efi_status_t return
value EFI_SUCCESS.

Signed-off-by: Bryan O'Donoghue <pure.logic at nexus-software.ie>
---
 lib/efi_loader/efi_memory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index c5a8f3ab29..b513553fa4 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -239,7 +239,7 @@ efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
 		return EFI_INVALID_PARAMETER;
 
 	if (!pages)
-		return start;
+		return EFI_SUCCESS;
 
 	++efi_memory_map_key;
 	newlist = calloc(1, sizeof(*newlist));
@@ -326,7 +326,7 @@ efi_status_t efi_add_memory_map(uint64_t start, uint64_t pages, int memory_type,
 		}
 	}
 
-	return start;
+	return EFI_SUCCESS;
 }
 
 /**
-- 
2.22.0



More information about the U-Boot mailing list