tty/serial: atmel: remove redundant assignment to ret
authorColin Ian King <colin.king@canonical.com>
Fri, 9 Aug 2019 17:40:42 +0000 (18:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2019 10:43:54 +0000 (12:43 +0200)
Variable ret is initialized to a value that is never read and it
is re-assigned later. The initialization is redundant and can be
removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190809174042.6276-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c

index 0b4f369..19a85d6 100644 (file)
@@ -2888,7 +2888,7 @@ static int atmel_serial_probe(struct platform_device *pdev)
        struct atmel_uart_port *atmel_port;
        struct device_node *np = pdev->dev.parent->of_node;
        void *data;
-       int ret = -ENODEV;
+       int ret;
        bool rs485_enabled;
 
        BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));