summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-01-25 13:49:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-01-25 13:49:50 +0000
commitb5e555d74e0afb8034aeadb0592d030b4860556a (patch)
treeb10ea1b64c05978ab91f6919bb5e791c3bff58a2 /sys/arch/hp300/dev
parent3769d838e5e045d6d1a4233d317411f381d74f9f (diff)
Behave correctly in interrupt handlers if no tty has been allocated yet
(this was supposed to have been fixed in r1.25, but there was still a missing check).
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r--sys/arch/hp300/dev/dca.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index f44ef867920..0c5a2891b77 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.33 2008/01/23 16:37:56 jsing Exp $ */
+/* $OpenBSD: dca.c,v 1.34 2009/01/25 13:49:49 miod Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -568,8 +568,9 @@ dcaintr(arg)
fifoin[fifocnt]++;
#endif
}
- if (!iflowdone && (tp->t_cflag&CRTS_IFLOW) &&
- tp->t_rawq.c_cc > TTYHOG/2) {
+ if (iflowdone == 0 && tp != NULL &&
+ (tp->t_cflag & CRTS_IFLOW) &&
+ tp->t_rawq.c_cc > (TTYHOG / 2)) {
dca->dca_mcr &= ~MCR_RTS;
iflowdone = 1;
}