diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 31b18053e9d..110553ac5c4 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -401,8 +401,13 @@ nmdmmodem(struct tty *tp, int sigon, int sigoff) static int nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) { + struct tty *tp = dev->si_tty; + int error; - return (tty_close(dev->si_tty)); + error = ttyld_close(tp, flag); + (void) tty_close(dev->si_tty); + + return (error); } static void