Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to rtw_free_mlme_priv. Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Vihas Makwana <makvihas@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_mlme.c | 15 ++++----------- drivers/staging/r8188eu/include/rtw_mlme.h | 2 -- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c index 50a65a4e2..fb64954a0 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme.c +++ b/drivers/staging/r8188eu/core/rtw_mlme.c @@ -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 @@ 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