From 0927c81df6eac780c326866be9cd6116d5556e57 Mon Sep 17 00:00:00 2001 From: Deric Cole Date: Wed, 24 Dec 2014 00:53:11 +0000 Subject: Address the potential system TPL does not been restore. This patch make sure the TPL been raised and restored in pair. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Deric Cole Reviewed-by: Elvin Li git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16556 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'IntelFrameworkModulePkg/Csm') diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c index 4ee20df1f7..8c7019f4f6 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c @@ -1,7 +1,7 @@ /** @file ConsoleOut Routines that speak VGA. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -2202,15 +2202,18 @@ BiosKeyboardSetState ( Status = KeyboardWrite (BiosKeyboardPrivate, 0xed); if (EFI_ERROR (Status)) { - return EFI_DEVICE_ERROR; + Status = EFI_DEVICE_ERROR; + goto Exit; } Status = KeyboardWaitForValue (BiosKeyboardPrivate, 0xfa, KEYBOARD_WAITFORVALUE_TIMEOUT); if (EFI_ERROR (Status)) { - return EFI_DEVICE_ERROR; + Status = EFI_DEVICE_ERROR; + goto Exit; } Status = KeyboardWrite (BiosKeyboardPrivate, Command); if (EFI_ERROR (Status)) { - return EFI_DEVICE_ERROR; + Status = EFI_DEVICE_ERROR; + goto Exit; } // // Call Legacy BIOS Protocol to set whatever is necessary @@ -2219,6 +2222,7 @@ BiosKeyboardSetState ( Status = EFI_SUCCESS; +Exit: // // Leave critical section and return // -- cgit v1.2.3