]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fs/proc/consoles.c: use seq_putc() in show_console_dev()
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 6 Feb 2018 23:37:34 +0000 (15:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 02:32:44 +0000 (18:32 -0800)
A single character (line break) should be put into a sequence.  Thus use
the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Link: http://lkml.kernel.org/r/04fb69fe-d820-9141-820f-07e9a48f4635@users.sourceforge.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/consoles.c

index 290ba85cb9002e7f0e9d6dd21dbbdbc4dd56e006..a8ac48aebd59dd2e33fc32539396b2fe98e02f3e 100644 (file)
@@ -55,8 +55,7 @@ static int show_console_dev(struct seq_file *m, void *v)
        if (dev)
                seq_printf(m, " %4d:%d", MAJOR(dev), MINOR(dev));
 
-       seq_printf(m, "\n");
-
+       seq_putc(m, '\n');
        return 0;
 }