summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-04-28 19:51:47 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-04-28 19:51:47 +0000
commit9890779218a69222217e2ee845467e04c073ade2 (patch)
tree9e8fd68abb2dfd1dbe314ff8d187f5509e92a708 /sys
parent09976350673fbf371d5634c20246c0be1275c26a (diff)
Only trust giofb_consid if non-zero.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sgi/gio/gio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sgi/gio/gio.c b/sys/arch/sgi/gio/gio.c
index f8a4d07614c..f3102a11643 100644
--- a/sys/arch/sgi/gio/gio.c
+++ b/sys/arch/sgi/gio/gio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gio.c,v 1.7 2012/04/27 19:20:21 miod Exp $ */
+/* $OpenBSD: gio.c,v 1.8 2012/04/28 19:51:46 miod Exp $ */
/* $NetBSD: gio.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */
/*
@@ -239,7 +239,7 @@ gio_attach(struct device *parent, struct device *self, void *aux)
ga.ga_ioh = PHYS_TO_XKPHYS(ga.ga_addr, CCA_NC);
/* no need to probe a glass console again */
- if (ga.ga_addr == giofb_consaddr)
+ if (ga.ga_addr == giofb_consaddr && giofb_consid != 0)
id = giofb_consid;
else {
id = gio_id(ga.ga_ioh, ga.ga_addr, 1);