]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Address the potential system TPL does not been restore.
authorDeric Cole <Deric_Cole@phoenix.com>
Wed, 24 Dec 2014 00:53:11 +0000 (00:53 +0000)
committerli-elvin <li-elvin@Edk2>
Wed, 24 Dec 2014 00:53:11 +0000 (00:53 +0000)
This patch make sure the TPL been raised and restored in pair.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Deric Cole <Deric_Cole@phoenix.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16556 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c

index 4ee20df1f725bfad0337c7d1630afd7396ea1a4b..8c7019f4f6ae9a1c3d2bfefd90654c3f0510e764 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   ConsoleOut Routines that speak VGA.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
@@ -2202,15 +2202,18 @@ BiosKeyboardSetState (
 \r
   Status = KeyboardWrite (BiosKeyboardPrivate, 0xed);\r
   if (EFI_ERROR (Status)) {\r
-    return EFI_DEVICE_ERROR;\r
+    Status = EFI_DEVICE_ERROR;\r
+    goto Exit;\r
   }  \r
   Status = KeyboardWaitForValue (BiosKeyboardPrivate, 0xfa, KEYBOARD_WAITFORVALUE_TIMEOUT);\r
   if (EFI_ERROR (Status)) {\r
-    return EFI_DEVICE_ERROR;\r
+    Status = EFI_DEVICE_ERROR;\r
+    goto Exit;\r
   }\r
   Status = KeyboardWrite (BiosKeyboardPrivate, Command);\r
   if (EFI_ERROR (Status)) {\r
-    return EFI_DEVICE_ERROR;\r
+    Status = EFI_DEVICE_ERROR;\r
+    goto Exit;\r
   }  \r
   //\r
   // Call Legacy BIOS Protocol to set whatever is necessary\r
@@ -2219,6 +2222,7 @@ BiosKeyboardSetState (
 \r
   Status = EFI_SUCCESS;\r
 \r
+Exit:\r
   //\r
   // Leave critical section and return\r
   //\r