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 2/6] neo: Remove a bogus NULL check
Date: Sun, 11 Jan 2009 19:48:34 +0000	[thread overview]
Message-ID: <20090111194830.16074.84119.stgit@localhost.localdomain> (raw)
In-Reply-To: <20090111194656.16074.14975.stgit@localhost.localdomain>

From: Alan Cox <alan@redhat.com>

Julia Lawall found an un-needed check in the neo driver. Her patch moves
the check to cover the code dereferencing it, however it cannot be NULL
anyway so remove the NULL check instead.

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

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


diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c
index b7584ca..e6390d0 100644
--- a/drivers/serial/jsm/jsm_neo.c
+++ b/drivers/serial/jsm/jsm_neo.c
@@ -577,9 +577,6 @@ static void neo_parse_modem(struct jsm_channel *ch, u8 signals)
 	jsm_printk(MSIGS, INFO, &ch->ch_bd->pci_dev,
 			"neo_parse_modem: port: %d msignals: %x\n", ch->ch_portnum, msignals);
 
-	if (!ch)
-		return;
-
 	/* Scrub off lower bits. They signify delta's, which I don't care about */
 	/* Keep DDCD and DDSR though */
 	msignals &= 0xf8;


  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 ` Alan Cox [this message]
2009-01-11 19:48 ` [PATCH 3/6] usb-serial: remove NULL check Alan Cox
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=20090111194830.16074.84119.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