x86/efistub: Avoid returning EFI_SUCCESS on error
authorArd Biesheuvel <ardb@kernel.org>
Thu, 4 Jul 2024 08:59:23 +0000 (10:59 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 8 Jul 2024 08:17:45 +0000 (10:17 +0200)
commitfb318ca0a522295edd6d796fb987e99ec41f0ee5
tree48164f2ce36edcde2865ca3b3da57bc89036c5e4
parent71e49eccdca6328eecc335ed8f5557bd0ed70fc6
x86/efistub: Avoid returning EFI_SUCCESS on error

The fail label is only used in a situation where the previous EFI API
call succeeded, and so status will be set to EFI_SUCCESS. Fix this, by
dropping the goto entirely, and call efi_exit() with the correct error
code.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/x86-stub.c