From: Michael Straube Date: Tue, 1 Nov 2022 19:14:58 +0000 (+0100) Subject: staging: r8188eu: convert rtw_free_stainfo() to void X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=29626f3c07d09b79d6510d1915c106e51ba85022;p=linux.git staging: r8188eu: convert rtw_free_stainfo() to void 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 # Edimax N150 Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20221101191458.8619-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index 51324e708697f..b4aee86230991 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -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] */ diff --git a/drivers/staging/r8188eu/include/sta_info.h b/drivers/staging/r8188eu/include/sta_info.h index 55ea5edc29141..e42f4b4c6e247 100644 --- a/drivers/staging/r8188eu/include/sta_info.h +++ b/drivers/staging/r8188eu/include/sta_info.h @@ -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);