USB: serial: xr: simplify line-speed logic

Simplify the changed-line-speed conditional expression.

Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
Johan Hovold 2021-01-21 11:29:19 +01:00
parent 3556751159
commit 736c09316c
1 changed files with 1 additions and 2 deletions

View File

@ -451,8 +451,7 @@ static void xr_set_termios(struct tty_struct *tty,
u8 bits = 0;
int ret;
if ((old_termios && tty->termios.c_ospeed != old_termios->c_ospeed) ||
!old_termios)
if (!old_termios || (tty->termios.c_ospeed != old_termios->c_ospeed))
xr_set_baudrate(tty, port);
switch (C_CSIZE(tty)) {