lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] tty: do checkpatch cleanup
Signed-off-by: Atin Bainada <hi@atinb.me>
---
drivers/tty/tty_ioctl.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 12983ce4e43e..05a4dd0db476 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
* the number of bytes written. If no method is provided 2K is always
* returned and data may be lost as there will be no flow control.
*/
-
+
unsigned int tty_write_room(struct tty_struct *tty)
{
if (tty->ops->write_room)
@@ -403,6 +403,7 @@ __weak int kernel_termios_to_user_termio(struct termio __user *termio,
struct ktermios *termios)
{
struct termio v;
+
memset(&v, 0, sizeof(struct termio));
v.c_iflag = termios->c_iflag;
v.c_oflag = termios->c_oflag;
@@ -540,6 +541,7 @@ static void copy_termios_locked(struct tty_struct *tty, struct ktermios *kterm)
static int get_termio(struct tty_struct *tty, struct termio __user *termio)
{
struct ktermios kterm;
+
copy_termios(tty, &kterm);
if (kernel_termios_to_user_termio(termio, &kterm))
return -EFAULT;
@@ -919,6 +921,7 @@ static int __tty_perform_flush(struct tty_struct *tty, unsigned long arg)
int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
{
struct tty_ldisc *ld;
+
int retval = tty_check_change(tty);
if (retval)
return retval;
--
2.39.2

\
 
 \ /
  Last update: 2023-03-27 00:47    [W:0.085 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site