diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/maple/pci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index dc05af5156a9..ec5c14f5ba49 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -213,6 +213,9 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | |||
213 | if (hose == NULL) | 213 | if (hose == NULL) |
214 | return PCIBIOS_DEVICE_NOT_FOUND; | 214 | return PCIBIOS_DEVICE_NOT_FOUND; |
215 | 215 | ||
216 | if (offset > 0xff) | ||
217 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
218 | |||
216 | addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); | 219 | addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); |
217 | if (!addr) | 220 | if (!addr) |
218 | return PCIBIOS_DEVICE_NOT_FOUND; | 221 | return PCIBIOS_DEVICE_NOT_FOUND; |
@@ -245,6 +248,9 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
245 | if (hose == NULL) | 248 | if (hose == NULL) |
246 | return PCIBIOS_DEVICE_NOT_FOUND; | 249 | return PCIBIOS_DEVICE_NOT_FOUND; |
247 | 250 | ||
251 | if (offset > 0xff) | ||
252 | return PCIBIOS_BAD_REGISTER_NUMBER; | ||
253 | |||
248 | addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); | 254 | addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); |
249 | if (!addr) | 255 | if (!addr) |
250 | return PCIBIOS_DEVICE_NOT_FOUND; | 256 | return PCIBIOS_DEVICE_NOT_FOUND; |