diff options
| author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-11 07:23:59 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-29 01:17:42 +0300 |
| commit | f9d1083da00514ef36a06e915f32b7304ae5b5bd (patch) | |
| tree | 00e3a5adb52ce303babe8a1b4bea1504ea5e17e8 | |
| parent | 35373abbce3e63754f96792cc1e5a4b329d3c737 (diff) | |
| download | linux-f9d1083da00514ef36a06e915f32b7304ae5b5bd.tar.xz | |
serial: core: Cleanup uart_open() exit
If aborting uart_open() unsuccessfully, retval is non-zero, so the
existing fall-through exit is equivalent.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/serial/serial_core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 1e7430c60ee6..5cf069756497 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1622,15 +1622,12 @@ static int uart_open(struct tty_struct *tty, struct file *filp) /* * If we succeeded, wait until the port is ready. */ +err_unlock: mutex_unlock(&port->mutex); if (retval == 0) retval = tty_port_block_til_ready(port, tty, filp); - end: return retval; -err_unlock: - mutex_unlock(&port->mutex); - goto end; } static const char *uart_type(struct uart_port *port) |
