diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index ac723e3c031a..9bbdb1de12e2 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -388,7 +388,7 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty, deinitialize_tty_struct(o_tty); free_tty_struct(o_tty); err_put_module: - module_put(o_tty->driver->owner); + module_put(driver->other->owner); err: kfree(ports[0]); kfree(ports[1]);