aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2018-07-20 10:47:22 +0900
committerIngo Molnar <[email protected]>2018-07-22 14:13:43 +0200
commit093174f52553532b9eb0e63cbbb254f6990d46d5 (patch)
tree80f3749a353e0993b309112f59516f3f0e783492
parent290084c2fa13e9aaa7f856ed1ab30760327dd9f8 (diff)
efi/x86: Add missing NULL initialization in UGA draw protocol discovery
The UGA draw protocol discovery routine looks for a EFI handle that has both the UGA draw protocol and the PCI I/O protocol installed. It checks for the latter by calling handle_protocol() and pass it a PCI I/O protocol pointer variable by reference, but fails to initialize it to NULL, which means the non-NULL check later on in the code could produce false positives, given that the return code of the handle_protocol() call is ignored entirely. So add the missing initialization. Tested-by: Hans de Goede <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Lukas Wunner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/boot/compressed/eboot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index ac8e442db71f..92b573fd239c 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -359,6 +359,7 @@ setup_uga(struct screen_info *si, efi_guid_t *uga_proto, unsigned long size)
if (status != EFI_SUCCESS)
continue;
+ pciio = NULL;
efi_call_early(handle_protocol, handle, &pciio_proto, &pciio);
status = efi_call_proto(efi_uga_draw_protocol, get_mode, uga,