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 <[email protected]>
---
 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

Reply via email to