]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine the code to avoid error report.
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Feb 2013 05:54:24 +0000 (05:54 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Feb 2013 05:54:24 +0000 (05:54 +0000)
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14143 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c

index 597ada2610fb7c4a357dadbe31d279ca9dce9b7f..ab2ec8071a7e1fb085cbfb28b8eab2cffb31b15c 100644 (file)
@@ -3,7 +3,7 @@
   Child device(Disk, CDROM, etc) enumeration and child handler installation, and \r
   driver stop.\r
     \r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 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
@@ -719,6 +719,7 @@ IDEBusDriverBindingStart (
     //\r
     for (IdeDevice = BeginningIdeDevice; IdeDevice <= EndIdeDevice; IdeDevice++) {\r
 \r
+      ASSERT (IdeChannel * 2 + IdeDevice < MAX_IDE_DEVICE);\r
       if (IdeBusDriverPrivateData->DeviceProcessed[IdeChannel * 2 + IdeDevice]) {\r
         continue;\r
       }\r
@@ -738,6 +739,7 @@ IDEBusDriverBindingStart (
         continue;\r
       }\r
 \r
+      ASSERT (IdeChannel < IdeMaxChannel && IdeDevice < IdeMaxDevice);\r
       IdeBlkIoDevicePtr = IdeBlkIoDevice[IdeChannel][IdeDevice];\r
 \r
       //\r
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