staging: rtl8723bs: core: Remove unused variable 'res'
Subsystems (2)
PATCH 1/1 staging: rtl8723bs: core: Remove unused variable 'res'
The variable 'res' is not used in function, this commit remove it to fix the warning.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Xu Jia <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +1 -5
@@ -533,7 +533,6 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)u32 rtw_init_bcmc_stainfo (struct adapter *padapter) {struct sta_info *psta; -u32 res = _SUCCESS;NDIS_802_11_MAC_ADDRESS bcast_addr = {0xff ,0xff ,0xff ,0xff ,0xff ,0xff };struct sta_priv *pstapriv = &padapter->stapriv;
@@ -542,15 +541,12 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter) psta =rtw_alloc_stainfo (pstapriv, bcast_addr);if (!psta) { - res = _FAIL;RT_TRACE (_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail" )); - goto exit; +return _FAIL; }/* default broadcast & multicast use macid 1 */ psta->mac_id =1 ; - -exit:return _SUCCESS; }
I've been rejecting these patches until someone updates the callers to check the return. This patch just silences the warning but the code is still totally buggy.
regards,
dan carpenter
Greg Kroah-Hartman
maintainerQuoted 22 lines · Xu Jia
The variable 'res' is not used in function, this commit remove it to fix the warning.
Reported-by Hulk Robot <[email protected]>Signed-off-by Xu Jia <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +0
-1@@ -533,7 +533,6 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)u32 rtw_init_bcmc_stainfo (struct adapter *padapter) {struct sta_info *psta; -u32 res = _SUCCESS;NDIS_802_11_MAC_ADDRESS bcast_addr = {0xff ,0xff ,0xff ,0xff ,0xff ,0xff };struct sta_priv *pstapriv = &padapter->stapriv;
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c u32 rtw_init_bcmc_stainfo(struct adapter *padapter) · line 545
Quoted 7 lines
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +1
-2@@ -542,15 +541,12 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter) psta =rtw_alloc_stainfo (pstapriv, bcast_addr);if (!psta) { - res = _FAIL;RT_TRACE (_module_rtl871x_sta_mgt_c_, _drv_err_, ("rtw_alloc_stainfo fail" )); - goto exit; +return _FAIL;
You just changed the logic here, that's not a good thing for a "robot" to be doing at all.
greg k-h