提交 b56394bf 编写于 作者: R Ray Lee 提交者: Greg Kroah-Hartman

USB: io_ti.c: remove unneeded null tty check

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: NRay Lee <ray-lk@madrabbit.org>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 dfa5ec79
...@@ -1941,7 +1941,6 @@ static int edge_open (struct usb_serial_port *port, struct file * filp) ...@@ -1941,7 +1941,6 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
if (edge_port == NULL) if (edge_port == NULL)
return -ENODEV; return -ENODEV;
if (port->tty)
port->tty->low_latency = low_latency; port->tty->low_latency = low_latency;
port_number = port->number - port->serial->minor; port_number = port->number - port->serial->minor;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册