diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c index 6f387001b41a..9f5632f3dd08 100644 --- a/sys/sparc64/pci/psycho.c +++ b/sys/sparc64/pci/psycho.c @@ -957,7 +957,7 @@ psycho_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, if (offset % width != 0) return (-1); - if (reg > sizeof(sc->sc_pci_hpbcfg)) + if (reg >= sizeof(sc->sc_pci_hpbcfg)) return (0); if ((reg < PCIR_STATUS && reg + width > PCIR_STATUS) ||