summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/68328serial.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-30 09:22:04 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-10 17:04:16 (GMT)
commited334c0e3b4def138a27c84d7331c304f87a4701 (patch)
treecd630ff69a55e2957a0840d44e6792f3743aeb4b /drivers/tty/serial/68328serial.c
parentcb4595a2158371f8180b226fce42a47086585d5c (diff)
downloadlinux-ed334c0e3b4def138a27c84d7331c304f87a4701.tar.xz
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>
Diffstat (limited to 'drivers/tty/serial/68328serial.c')
-rw-r--r--drivers/tty/serial/68328serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index 5dc9c4b..748c18f 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
@@ -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;