From d557f93c085eae21ea83357885a7a1da570fc809 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 30 Mar 2006 03:26:52 +0000 Subject: Don't open if we're going away. --- sys/dev/uart/uart_tty.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/dev/uart') diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index 601c377..df3d9eb 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -137,6 +137,10 @@ uart_tty_open(struct tty *tp, struct cdev *dev) struct uart_softc *sc; sc = tp->t_sc; + + if (sc == NULL || sc->sc_leaving) + return (ENXIO); + sc->sc_opened = 1; return (0); } -- cgit v1.1