From 68bb5ce77e51cf35791e46f2202e36da97e5e6be Mon Sep 17 00:00:00 2001 From: erictian Date: Fri, 26 Nov 2010 01:49:27 +0000 Subject: EHCI Controllers with a CapLen of 0 are ignored. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11093 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 87e4aa079b..852a15adcb 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -1437,6 +1437,14 @@ EhcCreateUsb2Hc ( DEBUG ((EFI_D_INFO, "EhcCreateUsb2Hc: capability length %d\n", Ehc->CapLen)); + // + // EHCI Controllers with a CapLen of 0 are ignored. + // + if (Ehc->CapLen == 0) { + gBS->FreePool (Ehc); + return NULL; + } + // // Create AsyncRequest Polling Timer // -- cgit v1.2.3