]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
MdeModulePkg/UsbBusDxe: Update Device->NumOfInterface at error handling path to avoid...
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbEnumer.c
index f4aad66baf0de5b33602ce08fccafb4038350136..79453fed268f8e6b9dbe5fda926fedfd168df141 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb bus enumeration support.\r
 \r
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -420,6 +420,7 @@ UsbSelectConfig (
     UsbIf = UsbCreateInterface (Device, ConfigDesc->Interfaces[Index]);\r
 \r
     if (UsbIf == NULL) {\r
+      Device->NumOfInterface = Index;\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r