diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index 32cc61d6162..787c49b708d 100644 --- a/sys/dev/twe/twe.c +++ b/sys/dev/twe/twe.c @@ -273,7 +273,7 @@ twe_del_unit(struct twe_softc *sc, int unit) { int error; - if (unit < 0 || unit > TWE_MAX_UNITS) + if (unit < 0 || unit >= TWE_MAX_UNITS) return (ENXIO); if (sc->twe_drive[unit].td_disk == NULL)