From akpm@linux-foundation.org Wed Mar 5 11:42:20 2008 From: Ray Lee Date: Tue, 04 Mar 2008 15:25:12 -0800 Subject: USB: io_ti.c: remove unneeded null tty check To: greg@kroah.com Cc: linux-usb@vger.kernel.org, akpm@linux-foundation.org, ray-lk@madrabbit.org, alan@lxorguk.ukuu.org.uk, bunk@kernel.org, gregkh@suse.de Message-ID: <200803042325.m24NPC5D003217@imap1.linux-foundation.org> From: Ray Lee 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 Cc: Adrian Bunk Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/io_ti.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -1942,8 +1942,7 @@ static int edge_open (struct usb_serial_ 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) {