summaryrefslogtreecommitdiff
authorXindong Xu <xindong.xu@amlogic.com>2018-04-10 09:31:05 (GMT)
committer Gerrit Code Review <gituser@droid04>2018-04-10 09:31:05 (GMT)
commitc2b682e03065633a2b058cbb1e42a68dc7242d97 (patch)
tree69c8eb36a3b7e4886c71bca887ac31bd25911949
parentd764be38bbe19cb954e9b4f32c290806ad014be5 (diff)
parent352d6fd61e8332d8c6503c69aaf7999d9c059a6a (diff)
downloadcommon-c2b682e03065633a2b058cbb1e42a68dc7242d97.zip
common-c2b682e03065633a2b058cbb1e42a68dc7242d97.tar.gz
common-c2b682e03065633a2b058cbb1e42a68dc7242d97.tar.bz2
Merge "pty: cancel pty slave port buf's work in tty_release" into ampere-20180311
Diffstat
-rw-r--r--drivers/tty/tty_io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 8d9f9a8..fb9bada 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1702,6 +1702,8 @@ static void release_tty(struct tty_struct *tty, int idx)
if (tty->link)
tty->link->port->itty = NULL;
tty_buffer_cancel_work(tty->port);
+ if (tty->link)
+ tty_buffer_cancel_work(tty->link->port);
tty_kref_put(tty->link);
tty_kref_put(tty);