summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
index 4cc4fb4554..b49758b236 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c
@@ -458,6 +458,9 @@ BmGetActiveConsoleIn (
EFI_STATUS Status;
EFI_HANDLE *Handles;
+ Handles = NULL;
+ *Count = 0;
+
if (gST->ConsoleInHandle != NULL) {
Status = gBS->OpenProtocol (
gST->ConsoleInHandle,
@@ -480,10 +483,6 @@ BmGetActiveConsoleIn (
&Handles
);
}
- if (EFI_ERROR (Status)) {
- Handles = NULL;
- *Count = 0;
- }
return Handles;
}