summaryrefslogtreecommitdiff
path: root/drivers
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-27 09:51:07 -0700
commit821dda4337d66b6e279e0ab6067b29a61c34e690 (patch)
tree4ea6e7adba771aa7f92b1bf6e74c3ef529f9aad9 /drivers
parentddb289316dd9c6cf7498f4255e98e3bb7d7aee13 (diff)
drivers/tty/amiserial.c: add missing tty_unlock
commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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 220579592c20..34111486baac 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1113,8 +1113,10 @@ static int set_serial_info(struct async_struct * info,
(new_serial.close_delay != state->close_delay) ||
(new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
((new_serial.flags & ~ASYNC_USR_MASK) !=
- (state->flags & ~ASYNC_USR_MASK)))
+ (state->flags & ~ASYNC_USR_MASK))) {
+ tty_unlock();
return -EPERM;
+ }
state->flags = ((state->flags & ~ASYNC_USR_MASK) |
(new_serial.flags & ASYNC_USR_MASK));
info->flags = ((info->flags & ~ASYNC_USR_MASK) |