All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Lee <ray-lk@madrabbit.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Adrian Bunk <bunk@kernel.org>,
	linux-usb@vger.kernel.org, Greg KH <gregkh@suse.de>
Subject: [patch] Remove unneeded null tty check in drivers/usb/serial/io_ti.c
Date: Fri, 22 Feb 2008 08:12:43 -0800	[thread overview]
Message-ID: <47BEF47B.1020502@madrabbit.org> (raw)

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: linux-usb@vger.kernel.org
cc: Greg KH <gregkh@suse.de>
cc: Adrian Bunk <bunk@kernel.org>
cc: linux-kernel@vger.kernel.org
cc: Alan Cox <alan@lxorguk.ukuu.org.uk>

Index: linux-2.6/drivers/usb/serial/io_ti.c
===================================================================
--- linux-2.6.orig/drivers/usb/serial/io_ti.c	2008-02-22 07:26:47.000000000 -0800
+++ linux-2.6/drivers/usb/serial/io_ti.c	2008-02-22 07:28:12.000000000 -0800
@@ -1944,8 +1944,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) {

-- 



                 reply	other threads:[~2008-02-22 16:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47BEF47B.1020502@madrabbit.org \
    --to=ray-lk@madrabbit.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bunk@kernel.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.