瀏覽代碼

tty: 68328serial.c: move assignment out of if () block

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>
Greg Kroah-Hartman 10 年之前
父節點
當前提交
ed334c0e3b
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/tty/serial/68328serial.c

+ 2 - 1
drivers/tty/serial/68328serial.c

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