mirror of https://github.com/acidanthera/audk.git
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:
parent
d089bd5ffe
commit
1068a65374
|
@ -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,11 +1008,12 @@ ScsiScanCreateDevice (
|
|||
ScsiIoDevice->Lun,
|
||||
&ScsiDevicePath
|
||||
);
|
||||
}
|
||||
|
||||
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
FreePool (ScsiIoDevice);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
ScsiIoDevice->DevicePath = AppendDevicePathNode (
|
||||
ScsiBusDev->DevicePath,
|
||||
|
@ -1043,6 +1040,7 @@ ScsiScanCreateDevice (
|
|||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (ScsiIoDevice->DevicePath);
|
||||
FreePool (ScsiIoDevice);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue