diff options
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 3253905428ea..2cf5649a6dc0 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -1319,9 +1319,9 @@ static void uart_close(struct tty_struct *tty, struct file *filp) | |||
1319 | uport = state->uart_port; | 1319 | uport = state->uart_port; |
1320 | port = &state->port; | 1320 | port = &state->port; |
1321 | 1321 | ||
1322 | pr_debug("uart_close(%d) called\n", uport->line); | 1322 | pr_debug("uart_close(%d) called\n", uport ? uport->line : -1); |
1323 | 1323 | ||
1324 | if (tty_port_close_start(port, tty, filp) == 0) | 1324 | if (!port->count || tty_port_close_start(port, tty, filp) == 0) |
1325 | return; | 1325 | return; |
1326 | 1326 | ||
1327 | /* | 1327 | /* |