[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210414181129.1628598-18-lee.jones@linaro.org>
Date: Wed, 14 Apr 2021 19:10:49 +0100
From: Lee Jones <lee.jones@...aro.org>
To: lee.jones@...aro.org
Cc: linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ross Schmidt <ross.schm.dev@...il.com>,
linux-staging@...ts.linux.dev
Subject: [PATCH 17/57] staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly
Fixes the following W=1 kernel build warning(s):
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘rtw_init_bcmc_stainfo’:
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:512:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Ross Schmidt <ross.schm.dev@...il.com>
Cc: linux-staging@...ts.linux.dev
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 7b631a6b258a1..233febc145983 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -497,7 +497,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;
@@ -505,15 +504,12 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
- if (!psta) {
- res = _FAIL;
- goto exit;
- }
+ if (!psta)
+ return _FAIL;
/* default broadcast & multicast use macid 1 */
psta->mac_id = 1;
-exit:
return _SUCCESS;
}
--
2.27.0
Powered by blists - more mailing lists