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
This commit is contained in:
niruiyu 2011-10-27 05:24:06 +00:00
parent 20258293aa
commit 153a2bae71
1 changed files with 12 additions and 12 deletions

View File

@ -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