Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to rtw_free_mlme_priv. Signed-off-by: Vihas Makwana <makvihas@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_mlme.c | 17 +++++------------ drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 6b8c80fe9..5584e1b84 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -53,17 +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; @@ -290,7 +279,11 @@ int rtw_init_mlme_priv(struct adapter *padapter)/* struct mlme_priv *pmlmepriv) 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) diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h index 1dc1fbf04..fc30793f4 100644 --- a/drivers/staging/r8188eu/include/rtw_mlme.h +++ b/drivers/staging/r8188eu/include/rtw_mlme.h @@ -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, -- 2.30.2