]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Check the device path protocol before opening the PciIo BY_DRIVER.
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Oct 2011 05:24:06 +0000 (05:24 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 27 Oct 2011 05:24:06 +0000 (05:24 +0000)
Signed-off-by: niruiyu
Reviewed-by: jyao1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12579 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c

index bb05ecb1913029eedcc569078250337fab04bc14..f8830b1763c38f22c8b7ccad694c4295462035a1 100644 (file)
@@ -254,6 +254,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
   //\r
   // Open the IO Abstraction(s) needed\r
   //\r
@@ -269,18 +281,6 @@ 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