Check if video device exists before trying to install Video OpROM.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14335 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2013-05-09 08:47:09 +00:00
parent 30a95d4d39
commit ee65c5083b
1 changed files with 9 additions and 1 deletions

View File

@ -2914,7 +2914,15 @@ LegacyBiosInstallPciRom (
return EFI_UNSUPPORTED;
}
if (!Private->VgaInstalled) {
Status = Private->LegacyBiosPlatform->GetPlatformHandle (
Private->LegacyBiosPlatform,
EfiGetPlatformVgaHandle,
0,
&HandleBuffer,
&HandleCount,
NULL
);
if ((!EFI_ERROR (Status)) && (!Private->VgaInstalled)) {
//
// A return status of EFI_NOT_FOUND is considered valid (No EFI
// driver is controlling video.