diff options
| author | Hungyu Lin <dennylin0707@gmail.com> | 2026-07-07 11:25:00 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-07 13:43:59 +0200 |
| commit | 5de9bd8f31cf61ae0ef664841aeb246ecaf305c5 (patch) | |
| tree | 43004352cb74c76273422f042a73be4177dbfcd1 | |
| parent | 079643f555a4396552f565774d267ac63838278e (diff) | |
| download | linux-5de9bd8f31cf61ae0ef664841aeb246ecaf305c5.tar.gz linux-5de9bd8f31cf61ae0ef664841aeb246ecaf305c5.zip | |
staging: rtl8723bs: simplify update_attrib_sec_info control flow
Replace goto-based error handling with direct returns and
remove the temporary res variable.
No functional change.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260707112503.612-2-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_xmit.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index c5876cab93c1..9f54a7252159 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -507,7 +507,6 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib * static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *pattrib, struct sta_info *psta) { - signed int res = _SUCCESS; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; signed int bmcast = is_multicast_ether_addr(pattrib->ra); @@ -519,10 +518,8 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p if (psta->ieee8021x_blocked) { pattrib->encrypt = 0; - if ((pattrib->ether_type != 0x888e) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) { - res = _FAIL; - goto exit; - } + if ((pattrib->ether_type != 0x888e) && !check_fwstate(pmlmepriv, WIFI_MP_STATE)) + return _FAIL; } else { GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast); @@ -560,10 +557,8 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p pattrib->iv_len = 8; pattrib->icv_len = 4; - if (psecuritypriv->busetkipkey == _FAIL) { - res = _FAIL; - goto exit; - } + if (psecuritypriv->busetkipkey == _FAIL) + return _FAIL; if (bmcast) TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx); @@ -601,9 +596,7 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p else pattrib->bswenc = false; -exit: - - return res; + return _SUCCESS; } u8 qos_acm(u8 acm_mask, u8 priority) |
