diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-15 12:58:30 +0200 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-06-20 22:26:15 +0000 |
commit | 1f7a8b3389d66f279bf75fcfdd10c1c7d2561d6e (patch) | |
tree | 11a8144fdeeb0c63f097cb3d483451eb25eba77d /lib | |
parent | 997c2ce5cf9e669ca2d6713954e50af29ceea914 (diff) | |
download | u-boot-1f7a8b3389d66f279bf75fcfdd10c1c7d2561d6e.zip u-boot-1f7a8b3389d66f279bf75fcfdd10c1c7d2561d6e.tar.gz u-boot-1f7a8b3389d66f279bf75fcfdd10c1c7d2561d6e.tar.bz2 |
efi_loader: SetMode() parameters check
If EFI_GRAPHICS_OUTPUT_PROTOCOL.SetMode() is called with an invalid mode,
return EFI_UNSUPPORTED.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_gop.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index c44a1cf..676463f 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -60,12 +60,14 @@ out: static efi_status_t EFIAPI gop_set_mode(struct efi_gop *this, u32 mode_number) { + efi_status_t ret = EFI_SUCCESS; + EFI_ENTRY("%p, %x", this, mode_number); - if (mode_number != 0) - return EFI_EXIT(EFI_INVALID_PARAMETER); + if (mode_number) + ret = EFI_UNSUPPORTED; - return EFI_EXIT(EFI_SUCCESS); + return EFI_EXIT(ret); } static __always_inline struct efi_gop_pixel efi_vid16_to_blt_col(u16 vid) |