]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuVideoDxe/Driver.c
QuarkSocPkg/QncSmmDispatcher: Fix use after free issue
[mirror_edk2.git] / OvmfPkg / QemuVideoDxe / Driver.c
index 8d962b4438982ffbae4e838dd07be4d812a57111..fc8025ec46dea025ba6171be596a06f10f1549a2 100644 (file)
@@ -134,6 +134,9 @@ QemuVideoControllerDriverSupported (
   }\r
 \r
   Status = EFI_UNSUPPORTED;\r
+  if (!IS_PCI_VGA (&Pci)) {\r
+    goto Done;\r
+  }\r
   Card = QemuVideoDetect(Pci.Hdr.VendorId, Pci.Hdr.DeviceId);\r
   if (Card != NULL) {\r
     DEBUG ((EFI_D_INFO, "QemuVideo: %s detected\n", Card->Name));\r