[PATCH 1/1] efi_client: correct memset() return value

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Nov 4 23:14:23 CET 2025


Memset() must return a pointer to the start of the updated memory block.

Fixes: 476476e73b14 ("efi: Add support for loading U-Boot through an EFI stub")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 lib/efi_client/efi_stub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_client/efi_stub.c b/lib/efi_client/efi_stub.c
index a083c7f1e9b..da7972444df 100644
--- a/lib/efi_client/efi_stub.c
+++ b/lib/efi_client/efi_stub.c
@@ -110,7 +110,7 @@ void *memset(void *inptr, int ch, size_t size)
 	while (ptr < end)
 		*ptr++ = ch;
 
-	return ptr;
+	return inptr;
 }
 
 static void jump_to_uboot(ulong cs32, ulong addr, ulong info)
-- 
2.51.0



More information about the U-Boot mailing list