summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/tcx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc/dev/tcx.c')
-rw-r--r--sys/arch/sparc/dev/tcx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/sparc/dev/tcx.c b/sys/arch/sparc/dev/tcx.c
index 608fb4e64c0..a3c8fbfff8a 100644
--- a/sys/arch/sparc/dev/tcx.c
+++ b/sys/arch/sparc/dev/tcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcx.c,v 1.1 1997/08/08 08:25:31 downsj Exp $ */
+/* $OpenBSD: tcx.c,v 1.2 1998/11/20 15:57:24 deraadt Exp $ */
/* $NetBSD: tcx.c,v 1.8 1997/07/29 09:58:14 fair Exp $ */
/*
@@ -470,6 +470,9 @@ tcxmmap(dev, off, prot)
if (off & PGOFSET)
panic("tcxmmap");
+ if (off < 0)
+ return (-1);
+
/*
* Entries with size 0 map video RAM (i.e., the size in fb data).
*