Skip to content

Commit d414034

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
tty: n_tty: use output character directly
There is no point to use a local variable to store the character when we can pass it directly. This assignment comes from era when we used to do get_user(c, b). We no longer need this, so fix this. Signed-off-by: "Jiri Slaby (SUSE)" <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0d029ab commit d414034

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/tty/n_tty.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,8 +2373,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
23732373
nr -= num;
23742374
if (nr == 0)
23752375
break;
2376-
c = *b;
2377-
if (process_output(c, tty) < 0)
2376+
if (process_output(*b, tty) < 0)
23782377
break;
23792378
b++; nr--;
23802379
}

0 commit comments

Comments
 (0)