From a1f7e1e34fb3341a9e28a5bf9cb04ee64bff1869 Mon Sep 17 00:00:00 2001 From: li-elvin Date: Mon, 26 Sep 2011 06:01:07 +0000 Subject: [PATCH] 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 --- .../Csm/BiosThunk/VideoDxe/BiosVideo.c | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c index f2ad95d9fc..bb05ecb191 100644 --- a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c +++ b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c @@ -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, -- 2.39.2