Merge branch 'stable/for-jens-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / arch / um / drivers / chan_kern.c
index 80b47cb71e0a85e7ea1a10626f7a1e0efe8e5225..acbe6c67afbaa1efe09952b9c1987b17b5afa58b 100644 (file)
@@ -568,11 +568,7 @@ void chan_interrupt(struct line *line, int irq)
                reactivate_fd(chan->fd, irq);
        if (err == -EIO) {
                if (chan->primary) {
-                       struct tty_struct *tty = tty_port_tty_get(&line->port);
-                       if (tty != NULL) {
-                               tty_hangup(tty);
-                               tty_kref_put(tty);
-                       }
+                       tty_port_tty_hangup(&line->port, false);
                        if (line->chan_out != chan)
                                close_one_chan(line->chan_out, 1);
                }