[U-Boot] [PATCH v3 3/8] efi_loader: Change efi_add_memory_map() to return EFI_SUCCESS

Bryan O'Donoghue pure.logic at nexus-software.ie
Sun Jul 14 23:01:03 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 8625968396..e3a3b03a2d 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -248,7 +248,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));
@@ -335,7 +335,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