aboutsummaryrefslogtreecommitdiffstats
path: root/src/pciinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pciinit.c')
-rw-r--r--src/pciinit.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pciinit.c b/src/pciinit.c
index b1105311..f75e5527 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -116,12 +116,8 @@ static int pci_bios_allocate_region(u16 bdf, int region_num)
int is_64bit = !(val & PCI_BASE_ADDRESS_SPACE_IO) &&
(val & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64;
- if (is_64bit) {
- if (size > 0) {
- pci_config_writel(bdf, ofs + 4, 0);
- } else {
- pci_config_writel(bdf, ofs + 4, ~0);
- }
+ if (is_64bit && size > 0) {
+ pci_config_writel(bdf, ofs + 4, 0);
}
return is_64bit;
}