From fbbec42fe4e7423e40958ec1db79258610a11631 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 12 Oct 2004 21:00:19 +0000 Subject: [PATCH] Remove asserts which are not correct if the port is a tty. --- sys/dev/uart/uart_tty.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index d480019a0c9e..73ff7f292289 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -146,13 +146,8 @@ uart_tty_close(struct tty *tp) struct uart_softc *sc; sc = tp->t_sc; - if (sc == NULL || sc->sc_leaving) + if (sc == NULL || sc->sc_leaving || !sc->sc_opened) return; - if (!sc->sc_opened) { - KASSERT(!(tp->t_state & TS_ISOPEN), ("foo")); - return; - } - KASSERT(tp->t_state & TS_ISOPEN, ("foo")); if (sc->sc_hwiflow) UART_IOCTL(sc, UART_IOCTL_IFLOW, 0); @@ -162,7 +157,6 @@ uart_tty_close(struct tty *tp) UART_SETSIG(sc, SER_DDTR | SER_DRTS); wakeup(sc); - KASSERT(!(tp->t_state & TS_ISOPEN), ("foo")); sc->sc_opened = 0; return; }