Staging: rtl8188eu: core: rtw_mlme.c: Remove NULL test before vfree
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 15 Feb 2016 08:58:20 +0000 (14:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 23:06:51 +0000 (15:06 -0800)
The function vfree tests whether the argument is NULL and returns
immediately. So NULL test before vfree is not needed. Also remove braces
around if branch as they are no longer needed.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme.c

index 9c2e65904c0f5e4693114c2bf841ca8ca64e9d05..a645a620ebe296805b04974c460363365d13a6eb 100644 (file)
@@ -122,10 +122,8 @@ void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
        rtw_free_mlme_priv_ie_data(pmlmepriv);
 
-       if (pmlmepriv) {
-               if (pmlmepriv->free_bss_buf)
-                       vfree(pmlmepriv->free_bss_buf);
-       }
+       if (pmlmepriv)
+               vfree(pmlmepriv->free_bss_buf);
 }
 
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)