USB: serial: remove defensive test from set_termios
authorJohan Hovold <jhovold@gmail.com>
Wed, 26 Jun 2013 14:47:20 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:21:50 +0000 (16:21 -0700)
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>
drivers/usb/serial/cp210x.c
drivers/usb/serial/oti6858.c

index d6ef2f8da37dca2f7206f26db7d6269bdf0d13e6..5627058964d59854ac73a89c16efa82672734111 100644 (file)
@@ -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;
 
index 7e3e0782e51fe48ccb91e3e9e28eb42a380a0932..cf509c8c1aa1a6f347f820e314723d3457e8ce54 100644 (file)
@@ -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);