All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anil Belur <askb23@gmail.com>
To: Larry.Finger@lwfinger.net, Jes.Sorensen@redhat.com,
	gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Anil Belur <askb23@gmail.com>
Subject: [PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c - removed NULL pointer check before kfree()
Date: Thu, 10 Jul 2014 11:25:37 +0530	[thread overview]
Message-ID: <1404971737-9737-2-git-send-email-askb23@gmail.com> (raw)
In-Reply-To: <1404971737-9737-1-git-send-email-askb23@gmail.com>

From: Anil Belur <askb23@gmail.com>

- as kfree() internally checks for NULL, additional check it not
required.

Signed-off-by: Anil Belur <askb23@gmail.com>
---
 drivers/staging/rtl8723au/core/rtw_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c
index 1696cb8..b160780 100644
--- a/drivers/staging/rtl8723au/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
@@ -516,8 +516,7 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
 
 	psecnetwork = &psecuritypriv->sec_bss;
 	if (!psecnetwork) {
-		if (pcmd)
-			kfree(pcmd);
+		kfree(pcmd);
 
 		res = _FAIL;
 
-- 
1.9.1


  reply	other threads:[~2014-07-10  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10  5:55 [PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree() Anil Belur
2014-07-10  5:55 ` Anil Belur [this message]
2014-07-10  6:59 ` Anil Shashikumar Belur

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=1404971737-9737-2-git-send-email-askb23@gmail.com \
    --to=askb23@gmail.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@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.