]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: Always add TextInputEx to wait queue if available 21264/head
authorJan Janssen <medhefgo@web.de>
Mon, 8 Nov 2021 15:27:21 +0000 (16:27 +0100)
committerJan Janssen <medhefgo@web.de>
Mon, 29 Nov 2021 13:42:18 +0000 (14:42 +0100)
src/boot/efi/console.c

index 6b71e1e02c1b675b3f57573abf3b1b2520a9ec78..6e76745cc61686f71241260e59f4265b8ca6e18f 100644 (file)
@@ -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);