[PATCH] tty: do checkpatch cleanup

From: Atin Bainada
Date: Tue Mar 07 2023 - 11:05:50 EST


Signed-off-by: Atin Bainada <hi@xxxxxxxx>
---
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