Skip to content

Commit

Permalink
USB: io_ti.c: remove unneeded null tty check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ray Lee authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent dfa5ec7 commit b56394b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/serial/io_ti.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b56394b

Please sign in to comment.