diff --git a/src/boot/efi/console.c b/src/boot/efi/console.c index 6b71e1e02c..6e76745cc6 100644 --- a/src/boot/efi/console.c +++ b/src/boot/efi/console.c @@ -52,12 +52,12 @@ EFI_STATUS console_key_read(UINT64 *key, UINT64 timeout_usec) { /* If WaitForKeyEx fails here, the firmware pretends it talks this * protocol, but it really doesn't. */ TextInputEx = NULL; - else - events[n_events++] = TextInputEx->WaitForKeyEx; - checked = TRUE; } + if (TextInputEx) + events[n_events++] = TextInputEx->WaitForKeyEx; + err = BS->CreateEvent(EVT_TIMER, 0, NULL, NULL, &timer); if (EFI_ERROR(err)) return log_error_status_stall(err, L"Error creating timer event: %r", err);