public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: torvalds@osdl.org, linux-serial@vger.kernel.org
Subject: [PATCH 3/6] usb-serial: remove NULL check
Date: Sun, 11 Jan 2009 19:48:41 +0000	[thread overview]
Message-ID: <20090111194839.16074.51741.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090111194656.16074.14975.stgit@localhost.localdomain>

From: Alan Cox <alan@redhat.com>

Julia Lawell found a case where a NULL check was misplaced in the
usb-serial code. However as the object in question cannot be NULL the
check can simply be removed.

Signed-off-by: Alan Cox <alan@redhat.com>
---

 drivers/usb/serial/usb-serial.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)


diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 080ade2..cfcfd5a 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -511,9 +511,6 @@ static void usb_serial_port_work(struct work_struct *work)
 
 	dbg("%s - port %d", __func__, port->number);
 
-	if (!port)
-		return;
-
 	tty = tty_port_tty_get(&port->port);
 	if (!tty)
 		return;


  parent reply	other threads:[~2009-01-11 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-11 19:48 [PATCH 0/6] Series short description Alan Cox
2009-01-11 19:48 ` [PATCH 1/6] pty: Fix documentation Alan Cox
2009-01-11 19:48 ` [PATCH 2/6] neo: Remove a bogus NULL check Alan Cox
2009-01-11 19:48 ` Alan Cox [this message]
2009-01-11 19:48 ` [PATCH 4/6] ti_usb_3410_5052: support alternate firmware Alan Cox
2009-01-11 19:49 ` [PATCH 5/6] ti_usb_3410_5052: add Multi-Tech modem support Alan Cox

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=20090111194839.16074.51741.stgit@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-serial@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox