From: Johan Hovold Date: Thu, 21 Jan 2021 10:29:19 +0000 (+0100) Subject: USB: serial: xr: simplify line-speed logic X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=736c09316c905622c548582a47eaa2c8c542b520;p=linux.git USB: serial: xr: simplify line-speed logic Simplify the changed-line-speed conditional expression. Signed-off-by: Johan Hovold --- diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 2000277bacc19..fc727f4283f25 100644 --- a/drivers/usb/serial/xr_serial.c +++ b/drivers/usb/serial/xr_serial.c @@ -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)) {