Don't open if we're going away.

This commit is contained in:
Marcel Moolenaar 2006-03-30 03:26:52 +00:00
parent 06f40e9610
commit 793bcd17d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157277

View File

@ -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);
}