fixed ECC and Klocwork issues.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8501 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-06-09 03:47:29 +00:00
parent 261c3596a3
commit c72216a627
9 changed files with 46 additions and 39 deletions

View File

@ -362,7 +362,7 @@ GatherDeviceInfo (
//
// Start to parse the bars
//
for (Offset = 0x10, BarIndex = 0; Offset <= 0x24; BarIndex++) {
for (Offset = 0x10, BarIndex = 0; Offset <= 0x24 && BarIndex < PCI_MAX_BAR; BarIndex++) {
Offset = PciParseBar (PciIoDevice, Offset, BarIndex);
}
@ -1147,7 +1147,7 @@ UpdatePciInfo (
}
}
if (EFI_ERROR (Status)) {
if (EFI_ERROR (Status) || Configuration == NULL ) {
return EFI_UNSUPPORTED;
}