tty: serial: fsl_lpuart: remove the count initialization as it is not needed
authorSherry Sun <sherry.sun@nxp.com>
Mon, 18 Apr 2022 02:18:44 +0000 (10:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Apr 2022 14:22:38 +0000 (16:22 +0200)
No need to initialize the count variable in lpuart_copy_rx_to_tty(),
so let's remove it here.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://lore.kernel.org/r/20220418021844.29591-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c

index a2b39a1f52126d7a8199f12ccd7933ec1ec04f64..75b3c36c13bcf8aff9d45466bff9e1c7acc7e89f 100644 (file)
@@ -1115,7 +1115,7 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport)
        struct dma_chan *chan = sport->dma_rx_chan;
        struct circ_buf *ring = &sport->rx_ring;
        unsigned long flags;
-       int count = 0, copied;
+       int count, copied;
 
        if (lpuart_is_32(sport)) {
                unsigned long sr = lpuart32_read(&sport->port, UARTSTAT);