]> git.baikalelectronics.ru Git - uboot.git/commitdiff
efi_loader: refine set_keyboard_layout() status
authorVincent Stehlé <vincent.stehle@arm.com>
Fri, 6 Jan 2023 09:46:40 +0000 (10:46 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 13 Jan 2023 08:09:07 +0000 (09:09 +0100)
As per the EFI specification, the HII database protocol function
set_keyboard_layout() must return EFI_INVALID_PARAMETER when it is called
with a NULL key_guid argument. Modify the function accordingly to improve
conformance.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_hii.c

index 27db3be6a172269a1398f48da433ba847468852b..3b54ecb11ac13e59f7dc42a60afc401c1efd9a85 100644 (file)
@@ -758,6 +758,9 @@ set_keyboard_layout(const struct efi_hii_database_protocol *this,
 {
        EFI_ENTRY("%p, %pUs", this, key_guid);
 
+       if (!key_guid)
+               return EFI_EXIT(EFI_INVALID_PARAMETER);
+
        return EFI_EXIT(EFI_NOT_FOUND);
 }