The ParentDevicePath is not initialized when error happened and went to Done. So the ParentDevicePath is moved to the beginning of Start ().

Signed-off-by: li-elvin
Reviewed-by: niruiyu, rsun3


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12441 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2011-09-26 06:01:07 +00:00
parent 9703e34729
commit a1f7e1e34f
1 changed files with 12 additions and 12 deletions

View File

@ -269,6 +269,18 @@ BiosVideoDriverBindingStart (
return Status;
}
//
// Prepare for status code
//
Status = gBS->HandleProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
(VOID **) &ParentDevicePath
);
if (EFI_ERROR (Status)) {
return Status;
}
PciAttributesSaved = FALSE;
//
// Save original PCI attributes
@ -304,18 +316,6 @@ BiosVideoDriverBindingStart (
goto Done;
}
//
// Prepare for status code
//
Status = gBS->HandleProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
(VOID **) &ParentDevicePath
);
if (EFI_ERROR (Status)) {
goto Done;
}
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
EFI_PROGRESS_CODE,
EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_PC_ENABLE,