efi_client: correct memset() return value
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 4 Nov 2025 22:14:23 +0000 (23:14 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 15 Nov 2025 10:36:50 +0000 (11:36 +0100)
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@canonical.com>
lib/efi_client/efi_stub.c

index a083c7f..da79724 100644 (file)
@@ -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)