tty_rel_gone: add locking assertion

We already assert the lock is held later during tty_rel_free(), but it is
arguably good form to clarify locking expectations here as well at the
top-level that other drivers use.
This commit is contained in:
kevans 2019-11-29 14:46:13 +00:00
parent b4c6542df3
commit 6fa3c0bd17

View File

@ -1180,6 +1180,7 @@ void
tty_rel_gone(struct tty *tp)
{
tty_lock_assert(tp, MA_OWNED);
MPASS(!tty_gone(tp));
/* Simulate carrier removal. */