diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-27 09:41:35 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-27 11:46:51 +0200 |
commit | d414034ec901c3821f17bd44b8eaaa5820253417 (patch) | |
tree | 7b3824e3c9eb44be7eb6af8345a48f8e5821506e /drivers/tty/n_tty.c | |
parent | tty: n_tty: make flow of n_tty_receive_buf_common() a bool (diff) | |
download | linux-d414034ec901c3821f17bd44b8eaaa5820253417.tar.xz linux-d414034ec901c3821f17bd44b8eaaa5820253417.zip |
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)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230827074147.2287-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 8b2bacb3e40d..f6fa4dbdf78f 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -2373,8 +2373,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, nr -= num; if (nr == 0) break; - c = *b; - if (process_output(c, tty) < 0) + if (process_output(*b, tty) < 0) break; b++; nr--; } |