diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index 1bcdfd6fc50b..21c029b498ad 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -539,8 +539,9 @@ ttydisc_write(struct tty *tp, struct uio *uio, int ioflag) } while (oblen > 0); } -done: - ttydevsw_outwakeup(tp); +done: + if (!tty_gone(tp)) + ttydevsw_outwakeup(tp); /* * Add the amount of bytes that we didn't process back to the