staging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv
authorVihas Makwana <makvihas@gmail.com>
Fri, 22 Apr 2022 19:32:21 +0000 (01:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 09:34:36 +0000 (11:34 +0200)
Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to
rtw_free_mlme_priv.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220422193223.11948-6-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/include/rtw_mlme.h

index 50a65a4..fb64954 100644 (file)
@@ -53,16 +53,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
        rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie, &pmlmepriv->p2p_assoc_req_ie_len);
 }
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
-{
-
-       rtw_free_mlme_priv_ie_data(pmlmepriv);
-
-       if (pmlmepriv)
-               vfree(pmlmepriv->free_bss_buf);
-
-}
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *free_queue) */
 {
        struct  wlan_network    *pnetwork;
@@ -289,7 +279,10 @@ exit:
 
 void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
-       _rtw_free_mlme_priv(pmlmepriv);
+       rtw_free_mlme_priv_ie_data(pmlmepriv);
+
+       if (pmlmepriv)
+               vfree(pmlmepriv->free_bss_buf);
 }
 
 static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
index 1dc1fbf..fc30793 100644 (file)
@@ -560,8 +560,6 @@ void rtw_scan_timeout_handler(struct adapter *adapter);
 
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
-
  struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network(struct mlme_priv *pmlmepriv,