diff options
author | Aishwarya Pant | 2017-04-10 15:43:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2017-04-11 07:34:14 +0200 |
commit | 7ad61a386bb804ae562966ae23baf5f4deee014b (patch) | |
tree | 7d00a81a62b2484d826cc522210bbb1b04f2ae6c /drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | |
parent | staging: rtl8723bs: Add missing include <linux/of.h> to fix compile error (diff) | |
download | kernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.tar.gz kernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.tar.xz kernel-qcow2-linux-7ad61a386bb804ae562966ae23baf5f4deee014b.zip |
staging: rtl8723bs: remove null test before kfree
kfree(..) on a NULL pointer is a no-op; the null test here is redundant.
Detected by coccicheck.
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index d2c66041a561..52aa65bfd890 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -1170,10 +1170,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, } addkey_end: - if (param) - { - kfree((u8 *)param); - } + kfree((u8 *)param); return ret; @@ -1968,8 +1965,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel pairwise_cipher, padapter->securitypriv.ndisencryptstatus, padapter->securitypriv.ndisauthtype)); exit: - if (buf) - kfree(buf); + kfree(buf); if (ret) _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS); return ret; |