Fix a non-fatal off-by-one error in the previous revision.

This commit is contained in:
Marius Strobl 2007-12-01 19:42:33 +00:00
parent 19d6d0eb9a
commit ddcde502eb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174134

View File

@ -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) ||