diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 9f54a7252159..a91d4e12b724 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -664,7 +664,6 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p struct sta_priv *pstapriv = &padapter->stapriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv; - signed int res = _SUCCESS; int ret; _rtw_open_pktfile(pkt, &pktfile); @@ -741,19 +740,15 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p psta = rtw_get_bcmc_stainfo(padapter); } else { psta = rtw_get_stainfo(pstapriv, pattrib->ra); - if (!psta) { /* if we cannot get psta => drop the pkt */ - res = _FAIL; - goto exit; - } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) && !(psta->state & _FW_LINKED)) { - res = _FAIL; - goto exit; - } + if (!psta) /* if we cannot get psta => drop the pkt */ + return _FAIL; + else if (check_fwstate(pmlmepriv, WIFI_AP_STATE) && !(psta->state & _FW_LINKED)) + return _FAIL; } if (!psta) { /* if we cannot get psta => drop the pkt */ - res = _FAIL; - goto exit; + return _FAIL; } if (!(psta->state & _FW_LINKED)) @@ -762,8 +757,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p spin_lock_bh(&psta->lock); if (update_attrib_sec_info(padapter, pattrib, psta) == _FAIL) { spin_unlock_bh(&psta->lock); - res = _FAIL; - goto exit; + return _FAIL; } update_attrib_phy_info(padapter, pattrib, psta); @@ -799,9 +793,7 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p } /* pattrib->priority = 5; force to used VI queue, for testing */ - -exit: - return res; + return _SUCCESS; } static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitframe)