USB: serial: xr: simplify line-speed logic
authorJohan Hovold <johan@kernel.org>
Thu, 21 Jan 2021 10:29:19 +0000 (11:29 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 26 Jan 2021 15:16:49 +0000 (16:16 +0100)
Simplify the changed-line-speed conditional expression.

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/xr_serial.c

index 2000277bacc1980feb4966f72852b8a468199512..fc727f4283f2598736d3b57d0cc0184e1673807a 100644 (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)) {