mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: devel@driverdev.osuosl.org,
	Branden Bonaby <brandonbonaby94@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Himadri Pandya <himadri18.07@gmail.com>,
	Nishka Dasgupta <nishkadg.linux@gmail.com>,
	Tim Collier <osdevtc@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] staging/wlan-ng/hfa384x: Delete an unnecessary check before the macro call “dev_kfree_skb”
Date: Wed, 21 Aug 2019 14:40:38 +0200	[thread overview]
Message-ID: <81d89576-512e-2374-2708-0d22400a37a3@web.de> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 21 Aug 2019 14:30:30 +0200

The dev_kfree_skb() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 28d372a0663a..54f631c4155a 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -3070,9 +3070,7 @@ static void hfa384x_usbin_callback(struct urb *urb)
 	}			/* switch */

 exit:
-
-	if (skb)
-		dev_kfree_skb(skb);
+	dev_kfree_skb(skb);
 }

 /*----------------------------------------------------------------
--
2.23.0


                 reply	other threads:[~2019-08-21 12:40 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=81d89576-512e-2374-2708-0d22400a37a3@web.de \
    --to=markus.elfring@web.de \
    --cc=brandonbonaby94@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=himadri18.07@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nishkadg.linux@gmail.com \
    --cc=osdevtc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®