]> git.proxmox.com Git - mirror_edk2.git/commitdiff
The ParentDevicePath is not initialized when error happened and went to Done. So...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Sep 2011 06:01:07 +0000 (06:01 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 26 Sep 2011 06:01:07 +0000 (06:01 +0000)
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

IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c

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