summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2013-02-21 05:54:24 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2013-02-21 05:54:24 +0000
commit9bdcf582d178629e81cc109e274a63c8c668d6df (patch)
treeecd7ab84b1ebdc90aa6880f9b30a52abe43409a5 /IntelFrameworkModulePkg
parentb5ded3c4f0f1912e575f95c34d97b38809d03443 (diff)
Refine the code to avoid error report.
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
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
index 597ada261..ab2ec8071 100644
--- a/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
+++ b/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
@@ -3,7 +3,7 @@
Child device(Disk, CDROM, etc) enumeration and child handler installation, and
driver stop.
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, 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
@@ -719,6 +719,7 @@ IDEBusDriverBindingStart (
//
for (IdeDevice = BeginningIdeDevice; IdeDevice <= EndIdeDevice; IdeDevice++) {
+ ASSERT (IdeChannel * 2 + IdeDevice < MAX_IDE_DEVICE);
if (IdeBusDriverPrivateData->DeviceProcessed[IdeChannel * 2 + IdeDevice]) {
continue;
}
@@ -738,6 +739,7 @@ IDEBusDriverBindingStart (
continue;
}
+ ASSERT (IdeChannel < IdeMaxChannel && IdeDevice < IdeMaxDevice);
IdeBlkIoDevicePtr = IdeBlkIoDevice[IdeChannel][IdeDevice];
//