]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
efi/gop: Return EFI_SUCCESS if a usable GOP was found
authorArvind Sankar <nivedita@alum.mit.edu>
Fri, 6 Dec 2019 16:55:39 +0000 (16:55 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
BugLink: https://bugs.launchpad.net/bugs/1861929
[ Upstream commit dbd89c303b4420f6cdb689fd398349fc83b059dd ]

If we've found a usable instance of the Graphics Output Protocol
(GOP) with a framebuffer, it is possible that one of the later EFI
calls fails while checking if any support console output. In this
case status may be an EFI error code even though we found a usable
GOP.

Fix this by explicitly return EFI_SUCCESS if a usable GOP has been
located.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bhupesh Sharma <bhsharma@redhat.com>
Cc: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191206165542.31469-4-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/firmware/efi/libstub/gop.c

index 08f3c1a2fb4832b0d4d9f8677faaf55f4f8d1f5a..69b2b019a1d02de26d8bb1a997e02702f884f4b8 100644 (file)
@@ -198,7 +198,7 @@ setup_gop32(efi_system_table_t *sys_table_arg, struct screen_info *si,
 
        si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS;
 
-       return status;
+       return EFI_SUCCESS;
 }
 
 static efi_status_t
@@ -316,7 +316,7 @@ setup_gop64(efi_system_table_t *sys_table_arg, struct screen_info *si,
 
        si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS;
 
-       return status;
+       return EFI_SUCCESS;
 }
 
 /*