mirror of https://github.com/acidanthera/audk.git
MdeMdeModulePkg/UsbBusDxe: Break device enumeration process if the device descriptor includes 0 configuration.
Signed-off-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Mike Wu <mike.wu@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14338 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
391206e775
commit
70eca31be1
|
@ -788,8 +788,11 @@ UsbBuildDescTable (
|
|||
|
||||
DevDesc = UsbDev->DevDesc;
|
||||
NumConfig = DevDesc->Desc.NumConfigurations;
|
||||
DevDesc->Configs = AllocateZeroPool (NumConfig * sizeof (USB_CONFIG_DESC *));
|
||||
if (NumConfig == 0) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
DevDesc->Configs = AllocateZeroPool (NumConfig * sizeof (USB_CONFIG_DESC *));
|
||||
if (DevDesc->Configs == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue