Clean up meta data and code scrub for PCI Bus module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8624 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -140,7 +140,7 @@ LocalLoadFile2 (
|
||||
Scratch,
|
||||
ScratchSize
|
||||
);
|
||||
gBS->FreePool (Scratch);
|
||||
FreePool (Scratch);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
@ -432,7 +432,7 @@ LoadOpRomImage (
|
||||
|
||||
RomPcir = AllocatePool (sizeof (PCI_DATA_STRUCTURE));
|
||||
if (RomPcir == NULL) {
|
||||
gBS->FreePool (RomHeader);
|
||||
FreePool (RomHeader);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -496,8 +496,8 @@ LoadOpRomImage (
|
||||
Image = AllocatePool ((UINT32) RomImageSize);
|
||||
if (Image == NULL) {
|
||||
RomDecode (PciDevice, RomBarIndex, RomBar, FALSE);
|
||||
gBS->FreePool (RomHeader);
|
||||
gBS->FreePool (RomPcir);
|
||||
FreePool (RomHeader);
|
||||
FreePool (RomPcir);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@ -536,8 +536,8 @@ LoadOpRomImage (
|
||||
//
|
||||
// Free allocated memory
|
||||
//
|
||||
gBS->FreePool (RomHeader);
|
||||
gBS->FreePool (RomPcir);
|
||||
FreePool (RomHeader);
|
||||
FreePool (RomPcir);
|
||||
|
||||
return RetStatus;
|
||||
}
|
||||
@ -725,7 +725,7 @@ ProcessOpRomImage (
|
||||
);
|
||||
}
|
||||
|
||||
gBS->FreePool (PciOptionRomImageDevicePath);
|
||||
FreePool (PciOptionRomImageDevicePath);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = gBS->StartImage (ImageHandle, NULL, NULL);
|
||||
|
Reference in New Issue
Block a user