1 diff --git a/arch/mips/pci/ops-bridge.c b/arch/mips/pci/ops-bridge.c
2 index 6793a72edec2..28efce2dcb7d 100644
3 --- a/arch/mips/pci/ops-bridge.c
4 +++ b/arch/mips/pci/ops-bridge.c
5 @@ -170,7 +170,7 @@ static int
6 pci_read_config(struct pci_bus *bus, u32 devfn, int where, int size,
10 + if (!pci_is_root_bus(bus))
11 return pci_conf1_read_config(bus, devfn, where, size, value);
13 return pci_conf0_read_config(bus, devfn, where, size, value);
14 @@ -314,7 +314,7 @@ static int
15 pci_write_config(struct pci_bus *bus, u32 devfn, int where, int size,
18 - if (bus->number > 0)
19 + if (!pci_is_root_bus(bus))
20 return pci_conf1_write_config(bus, devfn, where, size, value);
22 return pci_conf0_write_config(bus, devfn, where, size, value);