瀏覽代碼

USB: serial: remove defensive test from set_termios

Remove defensive test from set_termios which is never called with a NULL
tty.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Hovold 12 年之前
父節點
當前提交
a0b9281e29
共有 2 個文件被更改,包括 0 次插入6 次删除
  1. 0 3
      drivers/usb/serial/cp210x.c
  2. 0 3
      drivers/usb/serial/oti6858.c

+ 0 - 3
drivers/usb/serial/cp210x.c

@@ -666,9 +666,6 @@ static void cp210x_set_termios(struct tty_struct *tty,
 	unsigned int bits;
 	unsigned int modem_ctl[4];
 
-	if (!tty)
-		return;
-
 	cflag = tty->termios.c_cflag;
 	old_cflag = old_termios->c_cflag;
 

+ 0 - 3
drivers/usb/serial/oti6858.c

@@ -411,9 +411,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
 	__le16 divisor;
 	int br;
 
-	if (!tty)
-		return;
-
 	cflag = tty->termios.c_cflag;
 
 	spin_lock_irqsave(&priv->lock, flags);