summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-27 05:24:06 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-27 05:24:06 +0000
commit153a2bae71cb93c7ed11160ce95ebc2bec1cd14b (patch)
treebcdce6dafe7b941308661b9ab083e7c1cbce0946
parent20258293aa75100109c684e8f2d2dd60a3a804c3 (diff)
downloadedk2-platforms-153a2bae71cb93c7ed11160ce95ebc2bec1cd14b.tar.xz
Check the device path protocol before opening the PciIo BY_DRIVER.
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
-rw-r--r--IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
index bb05ecb191..f8830b1763 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
@@ -255,6 +255,18 @@ BiosVideoDriverBindingStart (
}
//
+ // Prepare for status code
+ //
+ Status = gBS->HandleProtocol (
+ Controller,
+ &gEfiDevicePathProtocolGuid,
+ (VOID **) &ParentDevicePath
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
// Open the IO Abstraction(s) needed
//
Status = gBS->OpenProtocol (
@@ -269,18 +281,6 @@ 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