mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
USB: ark3116.c: fix check-after-use
The Coverity checker spotted that we'd have already oops'ed if one of these was NULL. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f6c1ceaa38
commit
f311cf58bd
@ -172,11 +172,6 @@ static void ark3116_set_termios(struct usb_serial_port *port,
|
||||
|
||||
dbg("%s - port %d", __FUNCTION__, port->number);
|
||||
|
||||
if (!port->tty || !port->tty->termios) {
|
||||
dbg("%s - no tty structures", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
if (!priv->termios_initialized) {
|
||||
*(port->tty->termios) = tty_std_termios;
|
||||
|
Loading…
Reference in New Issue
Block a user