From b5e555d74e0afb8034aeadb0592d030b4860556a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 25 Jan 2009 13:49:50 +0000 Subject: 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). --- sys/arch/hp300/dev/dca.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/hp300') 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; } -- cgit v1.2.3