diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
index b63173d181..4a5d8e8bc4 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c
@@ -1,7 +1,7 @@
 /** @file
 The module to produce Usb Bus PPI.
 
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
   
 This program and the accompanying materials
 are licensed and made available under the terms and conditions
@@ -307,13 +307,13 @@ PeiHubEnumeration (
         NewPeiUsbDevice->DeviceSpeed = (UINT8)IsPortLowSpeedDeviceAttached (PortStatus.PortStatus);
 
         if(NewPeiUsbDevice->DeviceSpeed != EFI_USB_SPEED_HIGH) {
-          if (PeiUsbDevice->DeviceSpeed == EFI_USB_SPEED_HIGH) {
-            NewPeiUsbDevice->Translator.TranslatorPortNumber = (UINT8)Index;
-            NewPeiUsbDevice->Translator.TranslatorHubAddress = *CurrentAddress;
-          } else {
-            CopyMem(&(NewPeiUsbDevice->Translator), &(PeiUsbDevice->Translator), sizeof(EFI_USB2_HC_TRANSACTION_TRANSLATOR));
+    	    if (PeiUsbDevice->DeviceSpeed == EFI_USB_SPEED_HIGH) {
+             NewPeiUsbDevice->Translator.TranslatorPortNumber = (UINT8)Index;
+             NewPeiUsbDevice->Translator.TranslatorHubAddress = *CurrentAddress;
+    	    } else {
+    	        CopyMem(&(NewPeiUsbDevice->Translator), &(PeiUsbDevice->Translator), sizeof(EFI_USB2_HC_TRANSACTION_TRANSLATOR));
           }
-        }
+      	}
 
         //
         // Configure that Usb Device
@@ -380,21 +380,18 @@ PeiUsbEnumeration (
 
 
   CurrentAddress = 0;
-  if (Usb2HcPpi != NULL) {
+  if (Usb2HcPpi != NULL){
     Usb2HcPpi->GetRootHubPortNumber (
                 PeiServices,
                 Usb2HcPpi,
                 (UINT8 *) &NumOfRootPort
                 );    
-  } else if (UsbHcPpi != NULL) {
+  } else {
     UsbHcPpi->GetRootHubPortNumber (
                 PeiServices,
                 UsbHcPpi,
                 (UINT8 *) &NumOfRootPort
                 );
-  } else {
-    ASSERT (FALSE);
-    return EFI_INVALID_PARAMETER;
   }
 
   for (Index = 0; Index < NumOfRootPort; Index++) {
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
index fe6121985c..000430ae78 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
@@ -627,18 +627,13 @@ SetKeyboardLayoutEvent (
     //
     KeyCode = EfiKeyToUsbKeyCodeConvertionTable [(UINT8) (TempKey.Key)];
     TableEntry = GetKeyDescriptor (UsbKeyboardDevice, KeyCode);
-    if (TableEntry == NULL) {
-      ReleaseKeyboardLayoutResources (UsbKeyboardDevice);
-      FreePool (KeyboardLayout);
-      return;
-    }
     CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));
 
     //
     // For non-spacing key, create the list with a non-spacing key followed by physical keys.
     //
     if (TempKey.Modifier == EFI_NS_KEY_MODIFIER) {
-      UsbNsKey = AllocateZeroPool (sizeof (USB_NS_KEY));
+      UsbNsKey = AllocatePool (sizeof (USB_NS_KEY));
       ASSERT (UsbNsKey != NULL);
 
       //