summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
diff options
context:
space:
mode:
authorMarkus Elfring2015-02-04 20:06:39 +0100
committerKalle Valo2015-02-06 07:51:35 +0100
commit6f24fe305986afcb9eb2bde1031798b3b2ebf649 (patch)
tree432975a38c791151ceeb3d739de07ccab3c84a5a /drivers/net/wireless/hostap
parentorinoco: Delete an unnecessary check before the function call "kfree" (diff)
downloadkernel-qcow2-linux-6f24fe305986afcb9eb2bde1031798b3b2ebf649.tar.gz
kernel-qcow2-linux-6f24fe305986afcb9eb2bde1031798b3b2ebf649.tar.xz
kernel-qcow2-linux-6f24fe305986afcb9eb2bde1031798b3b2ebf649.zip
hostap: Delete an unnecessary check before the function call "kfree"
The kfree() function tests whether its argument is NULL and then returns immediately. 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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 596525528f50..fd8d83dd4f62 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -145,7 +145,7 @@ static void ap_free_sta(struct ap_data *ap, struct sta_info *sta)
if (sta->aid > 0)
ap->sta_aid[sta->aid - 1] = NULL;
- if (!sta->ap && sta->u.sta.challenge)
+ if (!sta->ap)
kfree(sta->u.sta.challenge);
del_timer_sync(&sta->timer);
#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */