]> err.no Git - linux-2.6/commitdiff
USB: io_ti.c: remove unneeded null tty check
authorRay Lee <ray-lk@madrabbit.org>
Tue, 4 Mar 2008 23:25:12 +0000 (15:25 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:40 +0000 (21:16 -0700)
The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of
port->tty (it's blindly dereferenced later without the check).

Alan Cox confirmed the check can go.

Signed-off-by: Ray Lee <ray-lk@madrabbit.org>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/io_ti.c

index 6afee30a6a5ce03c1c1f5045c8f9546dc5667a2e..316467ecd7788ba1a8d036f690c27444359078b9 100644 (file)
@@ -1941,8 +1941,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
        if (edge_port == NULL)
                return -ENODEV;
 
-       if (port->tty)
-               port->tty->low_latency = low_latency;
+       port->tty->low_latency = low_latency;
 
        port_number = port->number - port->serial->minor;
        switch (port_number) {