USB: serial: oti6858: remove redundant assignment to variable divisor
authorColin Ian King <colin.i.king@gmail.com>
Wed, 7 Feb 2024 10:18:33 +0000 (10:18 +0000)
committerJohan Hovold <johan@kernel.org>
Mon, 4 Mar 2024 13:37:52 +0000 (14:37 +0100)
The variable divisor is being assigned a value that is not being
read afterward, it is being re-assigned later in both paths of an if
statement.  The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/usb/serial/oti6858.c:412:2: warning: Value stored to 'divisor'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/oti6858.c

index 6365cfe5402cb52aa6a177195a5c0c0ff8a52451..fa07f6ff9ecc84486828cfe27d286e8594cd56ca 100644 (file)
@@ -409,7 +409,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
        cflag = tty->termios.c_cflag;
 
        spin_lock_irqsave(&priv->lock, flags);
-       divisor = priv->pending_setup.divisor;
        frame_fmt = priv->pending_setup.frame_fmt;
        control = priv->pending_setup.control;
        spin_unlock_irqrestore(&priv->lock, flags);