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