MdeModulePkg/UsbBusDxe: Update Device->NumOfInterface at error handling path to avoid system hang when DisconnectController is invoked to free resource occupied by usb device whose interface descriptor format doesn't follow usb spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16128 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Feng Tian 2014-09-18 06:06:25 +00:00 committed by erictian
parent a308e0588b
commit 4d3d422dff
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Usb bus enumeration support.
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -420,6 +420,7 @@ UsbSelectConfig (
UsbIf = UsbCreateInterface (Device, ConfigDesc->Interfaces[Index]);
if (UsbIf == NULL) {
Device->NumOfInterface = Index;
return EFI_OUT_OF_RESOURCES;
}