Commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4
Committed by
Greg Kroah-Hartman
1 parent
af6d17cdc8
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
drivers/tty/amiserial.c
... | ... | @@ -1073,8 +1073,10 @@ |
1073 | 1073 | (new_serial.close_delay != port->close_delay) || |
1074 | 1074 | (new_serial.xmit_fifo_size != state->xmit_fifo_size) || |
1075 | 1075 | ((new_serial.flags & ~ASYNC_USR_MASK) != |
1076 | - (port->flags & ~ASYNC_USR_MASK))) | |
1076 | + (port->flags & ~ASYNC_USR_MASK))) { | |
1077 | + tty_unlock(); | |
1077 | 1078 | return -EPERM; |
1079 | + } | |
1078 | 1080 | port->flags = ((port->flags & ~ASYNC_USR_MASK) | |
1079 | 1081 | (new_serial.flags & ASYNC_USR_MASK)); |
1080 | 1082 | state->custom_divisor = new_serial.custom_divisor; |