From 153a2bae71cb93c7ed11160ce95ebc2bec1cd14b Mon Sep 17 00:00:00 2001 From: niruiyu Date: Thu, 27 Oct 2011 05:24:06 +0000 Subject: 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 --- .../Csm/BiosThunk/VideoDxe/BiosVideo.c | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'IntelFrameworkModulePkg') 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 @@ -254,6 +254,18 @@ BiosVideoDriverBindingStart ( return Status; } + // + // Prepare for status code + // + Status = gBS->HandleProtocol ( + Controller, + &gEfiDevicePathProtocolGuid, + (VOID **) &ParentDevicePath + ); + if (EFI_ERROR (Status)) { + return Status; + } + // // Open the IO Abstraction(s) needed // @@ -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 -- cgit