From 0326e6d596491db64d787136cbd703bde0ee8d77 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 6 Apr 2009 17:34:10 +0100 Subject: [PATCH] mxser: remove tty_port_tty_get from mxser_check_modem_status mxser_check_modem_status is called with tty parameter, so the reference should be increased by callers already -- for ioctl syscall it is held whole time gap since open to close, for interrupt, the reference count is increased in the irq handler. There is no tty_kref_put in that function, so this also fixes a refcounting bug. Signed-off-by: Jiri Slaby Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- drivers/char/mxser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 402c9f217f8..a420e8d437d 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -820,7 +820,6 @@ static void mxser_check_modem_status(struct tty_struct *tty, wake_up_interruptible(&port->port.open_wait); } - tty = tty_port_tty_get(&port->port); if (port->port.flags & ASYNC_CTS_FLOW) { if (tty->hw_stopped) { if (status & UART_MSR_CTS) { -- 2.41.1