Commit c534472f authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: rtl8188eu: remove return variable from rtw_init_bcmc_stainfo

Remove variable res, that is used to store the return value, from
rtw_init_bcmc_stainfo. Instead return _FAIL or _SUCCESS directly
and remove the now unneeded exit label.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20191027130604.68379-3-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e845ddd
...@@ -451,24 +451,21 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) ...@@ -451,24 +451,21 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
u32 rtw_init_bcmc_stainfo(struct adapter *padapter) u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
{ {
struct sta_info *psta; struct sta_info *psta;
u32 res = _SUCCESS;
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
psta = rtw_alloc_stainfo(pstapriv, bc_addr); psta = rtw_alloc_stainfo(pstapriv, bc_addr);
if (!psta) { if (!psta) {
res = _FAIL;
RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
("rtw_alloc_stainfo fail")); ("rtw_alloc_stainfo fail"));
goto exit; return _FAIL;
} }
/* default broadcast & multicast use macid 1 */ /* default broadcast & multicast use macid 1 */
psta->mac_id = 1; psta->mac_id = 1;
exit: return _SUCCESS;
return res;
} }
struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter) struct sta_info *rtw_get_bcmc_stainfo(struct adapter *padapter)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment