All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Somya Anand <somyaanand214@gmail.com>,
	Shraddha Barke <shraddha.6596@gmail.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	Wim de With <nauxuron@wimdewith.com>,
	Alison Schofield <amsfield22@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 6/6] Staging: gdm72xx: remove duplicate condition
Date: Mon, 22 Feb 2016 19:33:33 +0000	[thread overview]
Message-ID: <20160222193333.GF23565@mwanda> (raw)

We know "len" is not zero because we tested for that at the beginning of
the function so this test can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index 6d647d6..09bf64e 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -667,9 +667,8 @@ static void gdm_wimax_transmit_pkt(struct net_device *dev, char *buf, int len)
 	cmd_len = be16_to_cpup((const __be16 *)&buf[2]);
 
 	if (len < cmd_len + HCI_HEADER_SIZE) {
-		if (len)
-			netdev_err(dev, "%s: invalid length [%d/%d]\n",
-				   __func__, cmd_len + HCI_HEADER_SIZE, len);
+		netdev_err(dev, "%s: invalid length [%d/%d]\n",
+			   __func__, cmd_len + HCI_HEADER_SIZE, len);
 		return;
 	}
 

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Somya Anand <somyaanand214@gmail.com>,
	Shraddha Barke <shraddha.6596@gmail.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Amitoj Kaur Chawla <amitoj1606@gmail.com>,
	Wim de With <nauxuron@wimdewith.com>,
	Alison Schofield <amsfield22@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [patch 6/6] Staging: gdm72xx: remove duplicate condition
Date: Mon, 22 Feb 2016 22:33:33 +0300	[thread overview]
Message-ID: <20160222193333.GF23565@mwanda> (raw)

We know "len" is not zero because we tested for that at the beginning of
the function so this test can be removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c
index 6d647d6..09bf64e 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -667,9 +667,8 @@ static void gdm_wimax_transmit_pkt(struct net_device *dev, char *buf, int len)
 	cmd_len = be16_to_cpup((const __be16 *)&buf[2]);
 
 	if (len < cmd_len + HCI_HEADER_SIZE) {
-		if (len)
-			netdev_err(dev, "%s: invalid length [%d/%d]\n",
-				   __func__, cmd_len + HCI_HEADER_SIZE, len);
+		netdev_err(dev, "%s: invalid length [%d/%d]\n",
+			   __func__, cmd_len + HCI_HEADER_SIZE, len);
 		return;
 	}
 

             reply	other threads:[~2016-02-22 19:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 19:33 Dan Carpenter [this message]
2016-02-22 19:33 ` [patch 6/6] Staging: gdm72xx: remove duplicate condition Dan Carpenter

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=20160222193333.GF23565@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=amitoj1606@gmail.com \
    --cc=amsfield22@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nauxuron@wimdewith.com \
    --cc=shraddha.6596@gmail.com \
    --cc=somyaanand214@gmail.com \
    --cc=sudipm.mukherjee@gmail.com \
    /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.