diff options
Diffstat (limited to 'hw/xfree86/common/xf86pciBus.c')
-rw-r--r-- | hw/xfree86/common/xf86pciBus.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 790bf7409..c5a022bf9 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -424,7 +424,7 @@ FindPCIVideoInfo(void) if ((pcrp->pci_command & PCI_CMD_MEM_ENABLE) && (num == 1 || ((info->class == PCI_CLASS_DISPLAY) && - (info->subclass == PCI_SUBCLASS_DISPLAY_MISC)))) { + (info->subclass == PCI_SUBCLASS_DISPLAY_VGA)))) { if (primaryBus.type == BUS_NONE) { primaryBus.type = BUS_PCI; primaryBus.id.pci.bus = pcrp->busnum; @@ -3230,10 +3230,14 @@ pciVideoPtr xf86GetPciInfoForEntity(int entityIndex) { pciVideoPtr *ppPci; - EntityPtr p = xf86Entities[entityIndex]; + EntityPtr p; - if (entityIndex >= xf86NumEntities - || p->busType != BUS_PCI) return NULL; + if (entityIndex >= xf86NumEntities) + return NULL; + + p = xf86Entities[entityIndex]; + if (p->busType != BUS_PCI) + return NULL; for (ppPci = xf86PciVideoInfo; *ppPci != NULL; ppPci++) { if (p->pciBusId.bus == (*ppPci)->bus && |