]> git.baikalelectronics.ru Git - kernel.git/commit
mxser: restore baud rate if its setting fails
authorJiri Slaby <jslaby@suse.cz>
Wed, 22 Sep 2021 07:59:32 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 12:08:08 +0000 (14:08 +0200)
commitfd3d1e6e87d86d52edcdfd31c9c7152b719a08f8
tree9000abfe5207dd23f18c2c7bd22d85c16ee5935e
parent10ab54cc394ac92c318957cd51b206b501abebbe
mxser: restore baud rate if its setting fails

If a user tries to set a too high rate, it fails due to check in
mxser_set_baud(). But the high rate remains set in termios, so the user
might think everything went smooth. Restore the baud rate from the
old_termios if this happens, so that user knows nothing was changed in
fact.

It used to behave the correct way many years ago, but somehow the
restoration vanished with commit bd6fee8be361 (Char: mxser, remove it)
-- the commit removed mxser's older clone.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210922075938.31390-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c