diff options
author | Ilia Mirkin | 2011-03-13 06:29:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-03-14 19:57:34 +0100 |
commit | 7e901dcd73d73230ad0e66e35fb6f1da244e41f7 (patch) | |
tree | 426afa9c7fcd5d3a18cab26ae1c7fd4001dad855 /drivers/staging/rtl8192e/ieee80211/ieee80211_module.c | |
parent | staging: rtl8187se: Remove NULL check before kfree (diff) | |
download | kernel-qcow2-linux-7e901dcd73d73230ad0e66e35fb6f1da244e41f7.tar.gz kernel-qcow2-linux-7e901dcd73d73230ad0e66e35fb6f1da244e41f7.tar.xz kernel-qcow2-linux-7e901dcd73d73230ad0e66e35fb6f1da244e41f7.zip |
staging: rtl8192e: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8192e/ieee80211/ieee80211_module.c')
-rw-r--r-- | drivers/staging/rtl8192e/ieee80211/ieee80211_module.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c index 67bcd41e66b1..663b0b8e1095 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_module.c @@ -195,11 +195,8 @@ void free_ieee80211(struct net_device *dev) { struct ieee80211_device *ieee = netdev_priv(dev); int i; - if (ieee->pHTInfo != NULL) - { - kfree(ieee->pHTInfo); - ieee->pHTInfo = NULL; - } + kfree(ieee->pHTInfo); + ieee->pHTInfo = NULL; RemoveAllTS(ieee); ieee80211_softmac_free(ieee); del_timer_sync(&ieee->crypt_deinit_timer); |