summaryrefslogtreecommitdiff
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-08-25 07:56:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-28 13:35:14 +0300
commitc2fef5f845bef784f06d6dc2ee6a3fd013eaeee8 (patch)
tree328edf121e8e2403bf5d62a8dd5fca743b6f1b85 /drivers/char/lp.c
parent90ca6333fd65f318c47bff425e1ea36c0a5539f6 (diff)
downloadlinux-c2fef5f845bef784f06d6dc2ee6a3fd013eaeee8.tar.xz
lp: Avoid comma separated statements
Use semicolons and braces. Signed-off-by: Joe Perches <joe@perches.com> Link: https://lore.kernel.org/r/850c60ea44927e8cb7604d178c613ff8fc667984.1598331148.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r--drivers/char/lp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index bd95aba1f9fe..5f50e4072fae 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -853,8 +853,10 @@ static void lp_console_write(struct console *co, const char *s,
count--;
do {
written = parport_write(port, crlf, i);
- if (written > 0)
- i -= written, crlf += written;
+ if (written > 0) {
+ i -= written;
+ crlf += written;
+ }
} while (i > 0 && (CONSOLE_LP_STRICT || written > 0));
}
} while (count > 0 && (CONSOLE_LP_STRICT || written > 0));