From: Ray Lee Date: Tue, 4 Mar 2008 23:25:12 +0000 (-0800) Subject: USB: io_ti.c: remove unneeded null tty check X-Git-Tag: v2.6.26-rc1~1061^2~76 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b56394bf325820e9f338eaef2941f18b17b98098;p=linux-2.6 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: Ray Lee Cc: Adrian Bunk Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 6afee30a6a..316467ecd7 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -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) {