If there is an error when calling rtw_init_bcmc_stainfo() inside rtw_init_bcmc_stainfo(), variable res is set to _FAIL. However, when returning, _SUCCESS is always returned regardless. Just in case, all existing calls do not consider the result of the function. Compile-tested as I don't have the hardware. Removing this warning: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:536:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] Signed-off-by: Edmundo Carmona Antoranz <eantoranz@xxxxxxxxx> --- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c index f96dd0b40e04..7b578192adf5 100644 --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c @@ -551,7 +551,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter) psta->mac_id = 1; exit: - return _SUCCESS; + return res; } struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter) -- 2.30.2