From d0b2f91bede3bd5e3d24dd6803e56eee959c1797 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 20 Oct 2016 00:10:27 -0300 Subject: Linux-libre 4.8.2-gnu --- drivers/tty/ipwireless/tty.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'drivers/tty/ipwireless') diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c index 345cebb07..2685d59d2 100644 --- a/drivers/tty/ipwireless/tty.c +++ b/drivers/tty/ipwireless/tty.c @@ -252,20 +252,11 @@ static int ipwireless_get_serial_info(struct ipw_tty *tty, { struct serial_struct tmp; - if (!retinfo) - return (-EFAULT); - memset(&tmp, 0, sizeof(tmp)); tmp.type = PORT_UNKNOWN; tmp.line = tty->index; - tmp.port = 0; - tmp.irq = 0; - tmp.flags = 0; tmp.baud_base = 115200; - tmp.close_delay = 0; - tmp.closing_wait = 0; - tmp.custom_divisor = 0; - tmp.hub6 = 0; + if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) return -EFAULT; -- cgit v1.2.3-54-g00ecf