From ad5307e46c63a8f293f5588f33ef3bade6f191e5 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Fri, 16 Jul 2021 15:06:56 -0600 Subject: device/pci_rom: Make ON_DEVICE_ROM_LOAD condition truthy Truthy conditions are easier to reason about. BUG=none TEST=Boot guybrush Signed-off-by: Raul E Rangel Change-Id: I229c3e90f5122d6191b28f9b4b6de79ac2fcb627 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56401 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- src/device/pci_rom.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index fe7c1cfdf0..895c5b7737 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -68,11 +68,7 @@ struct rom_header *pci_rom_probe(const struct device *dev) if (rom_header) { printk(BIOS_DEBUG, "In CBFS, ROM address for %s = %p\n", dev_path(dev), rom_header); - } else if (!CONFIG(ON_DEVICE_ROM_LOAD)) { - printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n", - dev_path(dev)); - return NULL; - } else { + } else if (CONFIG(ON_DEVICE_ROM_LOAD)) { uintptr_t rom_address; rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); @@ -93,6 +89,10 @@ struct rom_header *pci_rom_probe(const struct device *dev) printk(BIOS_DEBUG, "Option ROM address for %s = %lx\n", dev_path(dev), (unsigned long)rom_address); rom_header = (struct rom_header *)rom_address; + } else { + printk(BIOS_DEBUG, "PCI Option ROM loading disabled for %s\n", + dev_path(dev)); + return NULL; } printk(BIOS_SPEW, -- cgit v1.2.3