diff options
author | hfang <hfang@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-23 09:12:51 +0000 |
---|---|---|
committer | hfang <hfang@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-03-23 09:12:51 +0000 |
commit | 261136bc32b456800f6dec7eedadea5b2a153eca (patch) | |
tree | 648a45a2af0145a301ddeec3e1dca0dce12945f6 /IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe | |
parent | 3fb46d0b04b82edeee118cb37dc11727d7fa8d8a (diff) | |
download | edk2-platforms-261136bc32b456800f6dec7eedadea5b2a153eca.tar.xz |
fix Klocwork issues
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7926 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe')
-rw-r--r-- | IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c index b09193cee1..59c416628c 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c @@ -353,11 +353,13 @@ ErrorExit: // Since there will be no timer handler for keyboard input any more,
// exhaust input data just in case there is still keyboard data left
//
- Status1 = EFI_SUCCESS;
- while (!EFI_ERROR (Status1)) {
- Status1 = KeyboardRead (ConsoleIn, &Data);;
+ if (ConsoleIn != NULL) {
+ Status1 = EFI_SUCCESS;
+ while (!EFI_ERROR (Status1)) {
+ Status1 = KeyboardRead (ConsoleIn, &Data);;
+ }
}
-
+
if (ConsoleIn != NULL) {
gBS->FreePool (ConsoleIn);
}
|