tty: 68328serial.c: move assignment out of if () block
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Apr 2015 09:22:04 +0000 (11:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 May 2015 17:04:16 +0000 (19:04 +0200)
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

CC: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/68328serial.c

index 5dc9c4b..748c18f 100644 (file)
@@ -508,7 +508,8 @@ static void change_speed(struct m68k_serial *info, struct tty_struct *tty)
        int     i;
 
        cflag = tty->termios.c_cflag;
-       if (!(port = info->port))
+       port = info->port;
+       if (!port)
                return;
 
        ustcnt = uart->ustcnt;