summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/com.c4
-rw-r--r--sys/dev/isa/com.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 0ca439f9f19..058d6c8c828 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: com.c,v 1.27 1994/03/23 03:01:53 mycroft Exp $
+ * $Id: com.c,v 1.28 1994/03/25 04:38:01 mycroft Exp $
*/
/*
@@ -279,7 +279,7 @@ comopen(dev, flag, mode, p)
int s;
int error = 0;
- if (unit > NCOM)
+ if (unit >= NCOM)
return ENXIO;
sc = &com_softc[unit];
if (!sc->sc_iobase)
diff --git a/sys/dev/isa/com.c b/sys/dev/isa/com.c
index 0ca439f9f19..058d6c8c828 100644
--- a/sys/dev/isa/com.c
+++ b/sys/dev/isa/com.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: com.c,v 1.27 1994/03/23 03:01:53 mycroft Exp $
+ * $Id: com.c,v 1.28 1994/03/25 04:38:01 mycroft Exp $
*/
/*
@@ -279,7 +279,7 @@ comopen(dev, flag, mode, p)
int s;
int error = 0;
- if (unit > NCOM)
+ if (unit >= NCOM)
return ENXIO;
sc = &com_softc[unit];
if (!sc->sc_iobase)