summaryrefslogtreecommitdiffstats
path: root/src/device/pci_rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/pci_rom.c')
-rw-r--r--src/device/pci_rom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 106b5f9c8bc2..fe7c1cfdf029 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -78,11 +78,9 @@ struct rom_header *pci_rom_probe(const struct device *dev)
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
if (rom_address == 0x00000000 || rom_address == 0xffffffff) {
-#if CONFIG(CPU_QEMU_X86)
- if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
+ if (CONFIG(CPU_QEMU_X86) && (dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
rom_address = 0xc0000;
else
-#endif
return NULL;
} else {
/* Enable expansion ROM address decoding. */