summaryrefslogtreecommitdiffstats
path: root/drivers/tty/amiserial.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-04-19 18:12:40 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-20 04:15:35 +0200
commitd3a7b83f865b46bb7b5e1ed18a129ce1af349db4 (patch)
tree92f4c1c7ca160b2788a27ae10e1b6c5fdfa64efc /drivers/tty/amiserial.c
parentpch_uart: Fix dma channel unallocated issue (diff)
downloadlinux-d3a7b83f865b46bb7b5e1ed18a129ce1af349db4.tar.xz
linux-d3a7b83f865b46bb7b5e1ed18a129ce1af349db4.zip
drivers/tty/amiserial.c: add missing tty_unlock
tty_unlock is used on all other exits from the function. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Jiri Slaby <jslaby@suse.cz> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/tty/amiserial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 24145c30c9b0..6cc4358f68c1 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1073,8 +1073,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
(new_serial.close_delay != port->close_delay) ||
(new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
((new_serial.flags & ~ASYNC_USR_MASK) !=
- (port->flags & ~ASYNC_USR_MASK)))
+ (port->flags & ~ASYNC_USR_MASK))) {
+ tty_unlock();
return -EPERM;
+ }
port->flags = ((port->flags & ~ASYNC_USR_MASK) |
(new_serial.flags & ASYNC_USR_MASK));
state->custom_divisor = new_serial.custom_divisor;