]> Git Repo - linux.git/commitdiff
serial: core: drop redundant TIOCGSERIAL memset
authorJohan Hovold <[email protected]>
Wed, 7 Apr 2021 09:52:07 +0000 (11:52 +0200)
committerGreg Kroah-Hartman <[email protected]>
Sat, 10 Apr 2021 08:36:34 +0000 (10:36 +0200)
Since commit 5099d234a52a ("serial_core: switch to ->[sg]et_serial()")
the serial structure passed to uart_get_info() has already have been
cleared by the tty layer so drop the redundant memset.

Signed-off-by: Johan Hovold <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/tty/serial/serial_core.c

index ba31e97d3d96b8ee45351c918f86f03ff342a105..59336943a86f5975d8a076461def93aff2c27488 100644 (file)
@@ -759,8 +759,6 @@ static int uart_get_info(struct tty_port *port, struct serial_struct *retinfo)
        struct uart_port *uport;
        int ret = -ENODEV;
 
-       memset(retinfo, 0, sizeof(*retinfo));
-
        /*
         * Ensure the state we copy is consistent and no hardware changes
         * occur as we go
This page took 0.060582 seconds and 4 git commands to generate.