staging: r8188eu: convert rtw_free_stainfo() to void
authorMichael Straube <straube.linux@gmail.com>
Tue, 1 Nov 2022 19:14:58 +0000 (20:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Nov 2022 07:28:41 +0000 (08:28 +0100)
The function rtw_free_stainfo() returns always _SUCCESS and none of
its callers uses the return value. We can safely make the function
void. Yet another tiny step towards getting rid of _FAIL / _SUCCESS.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20221101191458.8619-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_sta_mgt.c
drivers/staging/r8188eu/include/sta_info.h

index 51324e7..b4aee86 100644 (file)
@@ -242,7 +242,7 @@ exit:
 }
 
 /*  using pstapriv->sta_hash_lock to protect */
-u32    rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
+void rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
 {
        int i;
        struct __queue *pfree_sta_queue;
@@ -252,7 +252,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
        struct  sta_priv *pstapriv = &padapter->stapriv;
 
        if (!psta)
-               goto exit;
+               return;
 
        pfree_sta_queue = &pstapriv->free_sta_queue;
 
@@ -356,10 +356,6 @@ u32        rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
        spin_lock_bh(&pfree_sta_queue->lock);
        list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
        spin_unlock_bh(&pfree_sta_queue->lock);
-
-exit:
-
-       return _SUCCESS;
 }
 
 /*  free all stainfo which in sta_hash[all] */
index 55ea5ed..e42f4b4 100644 (file)
@@ -303,7 +303,7 @@ int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta);
 struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int off);
 
 struct sta_info *rtw_alloc_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
-u32    rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
+void rtw_free_stainfo(struct adapter *adapt, struct sta_info *psta);
 void rtw_free_all_stainfo(struct adapter *adapt);
 struct sta_info *rtw_get_stainfo(struct sta_priv *stapriv, u8 *hwaddr);
 u32 rtw_init_bcmc_stainfo(struct adapter *adapt);