@@ -99,7 +99,6 @@ find_gop(efi_guid_t *proto, unsigned long size, void **handles)
99
99
100
100
for_each_efi_handle (h , handles , size , i ) {
101
101
efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID ;
102
- bool conout_found = false;
103
102
void * dummy = NULL ;
104
103
105
104
status = efi_bs_call (handle_protocol , h , proto , (void * * )& gop );
@@ -111,25 +110,22 @@ find_gop(efi_guid_t *proto, unsigned long size, void **handles)
111
110
if (info -> pixel_format == PIXEL_BLT_ONLY )
112
111
continue ;
113
112
113
+ /*
114
+ * Systems that use the UEFI Console Splitter may
115
+ * provide multiple GOP devices, not all of which are
116
+ * backed by real hardware. The workaround is to search
117
+ * for a GOP implementing the ConOut protocol, and if
118
+ * one isn't found, to just fall back to the first GOP.
119
+ *
120
+ * Once we've found a GOP supporting ConOut,
121
+ * don't bother looking any further.
122
+ */
114
123
status = efi_bs_call (handle_protocol , h , & conout_proto , & dummy );
115
124
if (status == EFI_SUCCESS )
116
- conout_found = true;
117
-
118
- if (!first_gop || conout_found ) {
119
- /*
120
- * Systems that use the UEFI Console Splitter may
121
- * provide multiple GOP devices, not all of which are
122
- * backed by real hardware. The workaround is to search
123
- * for a GOP implementing the ConOut protocol, and if
124
- * one isn't found, to just fall back to the first GOP.
125
- *
126
- * Once we've found a GOP supporting ConOut,
127
- * don't bother looking any further.
128
- */
125
+ return gop ;
126
+
127
+ if (!first_gop )
129
128
first_gop = gop ;
130
- if (conout_found )
131
- break ;
132
- }
133
129
}
134
130
135
131
return first_gop ;
0 commit comments