]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/tty/amiserial.c: add missing tty_unlock
authorJulia Lawall <Julia.Lawall@lip6.fr>
Thu, 19 Apr 2012 16:12:40 +0000 (18:12 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:01 +0000 (13:14 +0100)
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/amiserial.c

index b84c83456dccf276e135cf07e50d7063b7da8440..8daf0735a45a89f485de918bb87e7a831506eae1 100644 (file)
@@ -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) |