From b99e9ca9163ae6298bb66cad705c3dc87f722bb0 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Thu, 24 Mar 2016 10:30:25 +0800 Subject: [PATCH] MdeModulePkg/Bds: Fix VS2012 build failure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Feng Tian --- MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 7 +++---- 1 file 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; } -- 2.39.2