diff --git a/tty/tiny_tty.c b/tty/tiny_tty.c index 4780ee176..8705634e9 100644 --- a/tty/tiny_tty.c +++ b/tty/tiny_tty.c @@ -551,8 +551,10 @@ static void __exit tiny_exit(void) struct tiny_serial *tiny; int i; - for (i = 0; i < TINY_TTY_MINORS; ++i) + for (i = 0; i < TINY_TTY_MINORS; ++i) { tty_unregister_device(tiny_tty_driver, i); + tty_port_destroy(tiny_tty_port + i); + } tty_unregister_driver(tiny_tty_driver); /* shut down all of the timers and free the memory */