USB: serial: ftdi_sio: Remove redundant assignment to variable cflag
Subsystems (3)
PATCH 1/1 USB: serial: ftdi_sio: Remove redundant assignment to variable cflag
The variable cflag is being assigned a value that is not being read afterwards, it is being re-assigned later on. The assignment is redundant and can be removed.
Cleans up clang scan warning:drivers/usb/serial/ftdi_sio.c:2613:15: warning: Value stored to 'cflag' during its initialization is never read [deadcode.DeadStores]
Signed-off-by Colin Ian King <[email protected]>
--- drivers/usb/serial/ftdi_sio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/serial/ftdi_sio.c +1 -1
@@ -2610,7 +2610,7 @@ static void ftdi_set_termios(struct tty_struct *tty,struct device *ddev = &port->dev;struct ftdi_private *priv =usb_get_serial_port_data (port);struct ktermios *termios = &tty->termios; -unsigned int cflag = termios->c_cflag; +unsigned int cflag;u16 value, index;int ret;
Signature · 1 line
2.39.2
Quoted 9 lines · Colin Ian King
The variable cflag is being assigned a value that is not being read afterwards, it is being re-assigned later on. The assignment is redundant and can be removed.
Cleans up clang scan warning:
drivers/usb/serial/ftdi_sio.c:2613:15: warning: Value stored to 'cflag' during its initialization is never read [deadcode.DeadStores]Signed-off-by Colin Ian King <[email protected]>
Applied, thanks.
Johan