Check the return code from CoreLocateDevicePath() in MdeModulePkg/Core/Dxe/Image/Image.c CoreLoadImageCommon().

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13703 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lzeng14 2012-09-06 05:00:34 +00:00
parent 59f968ccc8
commit 0407056e64
1 changed files with 4 additions and 1 deletions

View File

@ -1079,7 +1079,10 @@ CoreLoadImageCommon (
if (SourceBuffer != NULL) {
FHand.Source = SourceBuffer;
FHand.SourceSize = SourceSize;
CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);
Status = CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &HandleFilePath, &DeviceHandle);
if (EFI_ERROR (Status)) {
DeviceHandle = NULL;
}
if (SourceSize > 0) {
Status = EFI_SUCCESS;
} else {