]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c
Refine the code to avoid error report.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbBusDxe / UsbBus.c
index 873cf2519afb501c886810547a8af3f2f513629b..742cdc193124f1745629c2b15853ec7c54cd7b39 100644 (file)
@@ -2,7 +2,7 @@
 \r
     Usb Bus Driver Binding and Bus IO Protocol.\r
 \r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2013, 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
@@ -964,6 +964,7 @@ UsbBusBuildProtocol (
     // The EFI_USB2_HC_PROTOCOL is produced for XHCI support.\r
     // Then its max supported devices are 256. Otherwise it's 128.\r
     //\r
+    ASSERT (UsbBus->Usb2Hc != NULL);\r
     if (UsbBus->Usb2Hc->MajorRevision == 0x3) {\r
       UsbBus->MaxDevices = 256;\r
     }\r