From: Syam Sidhardhan <syamsidhardh@gmail.com>
To: jussi.kivilinna@mbnet.fi, linville@tuxdriver.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: syamsidhardh@gmail.com
Subject: [PATCH] rndis_wlan: Remove redundant NULL check before kfree
Date: Mon, 25 Feb 2013 03:35:43 +0530 [thread overview]
Message-ID: <1361743543-27912-1-git-send-email-s.syam@samsung.com> (raw)
kfree on a NULL pointer is a no-op.
Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
drivers/net/wireless/rndis_wlan.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 525fd75..5f66b4e 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2839,8 +2839,7 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev)
} else if (priv->infra_mode == NDIS_80211_INFRA_ADHOC)
cfg80211_ibss_joined(usbdev->net, bssid, GFP_KERNEL);
- if (info != NULL)
- kfree(info);
+ kfree(info);
priv->connected = true;
memcpy(priv->bssid, bssid, ETH_ALEN);
--
1.7.9.5
next reply other threads:[~2013-02-24 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-24 22:05 Syam Sidhardhan [this message]
2013-02-25 10:02 ` [PATCH] rndis_wlan: Remove redundant NULL check before kfree Jussi Kivilinna
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=1361743543-27912-1-git-send-email-s.syam@samsung.com \
--to=syamsidhardh@gmail.com \
--cc=jussi.kivilinna@mbnet.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox