Code size optimized

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7415 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jji4 2009-02-03 06:11:04 +00:00
parent d089bd5ffe
commit 1068a65374
1 changed files with 6 additions and 8 deletions

View File

@ -1001,10 +1001,6 @@ ScsiScanCreateDevice (
ScsiIoDevice->Lun, ScsiIoDevice->Lun,
&ScsiDevicePath &ScsiDevicePath
); );
if (Status == EFI_OUT_OF_RESOURCES) {
FreePool (ScsiIoDevice);
return Status;
}
} else { } else {
Status = ScsiIoDevice->ScsiPassThru->BuildDevicePath ( Status = ScsiIoDevice->ScsiPassThru->BuildDevicePath (
ScsiIoDevice->ScsiPassThru, ScsiIoDevice->ScsiPassThru,
@ -1012,11 +1008,12 @@ ScsiScanCreateDevice (
ScsiIoDevice->Lun, ScsiIoDevice->Lun,
&ScsiDevicePath &ScsiDevicePath
); );
}
if (Status == EFI_OUT_OF_RESOURCES) { if (Status == EFI_OUT_OF_RESOURCES) {
FreePool (ScsiIoDevice); FreePool (ScsiIoDevice);
return Status; return Status;
} }
}
ScsiIoDevice->DevicePath = AppendDevicePathNode ( ScsiIoDevice->DevicePath = AppendDevicePathNode (
ScsiBusDev->DevicePath, ScsiBusDev->DevicePath,
@ -1043,6 +1040,7 @@ ScsiScanCreateDevice (
NULL NULL
); );
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
FreePool (ScsiIoDevice->DevicePath);
FreePool (ScsiIoDevice); FreePool (ScsiIoDevice);
return EFI_OUT_OF_RESOURCES; return EFI_OUT_OF_RESOURCES;
} else { } else {