tty: fix termios input-speed encoding
authorJohan Hovold <johan@kernel.org>
Sun, 15 Jul 2018 13:39:33 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2018 09:58:15 +0000 (11:58 +0200)
commitfada18c48d774b9e837928ecdce6a5d5fdd11ee7
tree8aaf2a591e97164179394b13f5fce62e6fec84f3
parent8a8a66a1a18a1dbd213bee460bcedb1361abc7ff
tty: fix termios input-speed encoding

Make sure to clear the CIBAUD bits before OR-ing the new mask when
encoding the termios input baud rate.

This could otherwise lead to an incorrect input rate being reported back
and incidentally set on subsequent termios updates.

Fixes: edc6afc54968 ("[PATCH] tty: switch to ktermios and new framework")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_baudrate.c