staging: rtl8723bs: simplify rtw_xmitframe_coalesce() control flow

Replace goto-based error handling with direct returns and
remove the temporary res variable.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Link: https://patch.msgid.link/20260713070537.15903-5-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Hungyu Lin 2026-07-13 07:05:36 +00:00 committed by Greg Kroah-Hartman
parent 723b19cb3a
commit dfdf0d14ae

View File

@ -1082,7 +1082,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
u8 *pbuf_start;
s32 bmcst = is_multicast_ether_addr(pattrib->ra);
s32 res = _SUCCESS;
int ret;
if (!pxmitframe->buf_addr)
@ -1094,10 +1093,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
mem_start = pbuf_start + hw_hdr_offset;
ret = rtw_make_wlanhdr(padapter, mem_start, pattrib);
if (ret) {
res = _FAIL;
goto exit;
}
if (ret)
return _FAIL;
_rtw_open_pktfile(pkt, &pktfile);
ret = _rtw_pktfile_read(&pktfile, NULL, pattrib->pkt_hdrlen);
@ -1176,10 +1173,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
}
ret = xmitframe_addmic(padapter, pxmitframe);
if (ret) {
res = _FAIL;
goto exit;
}
if (ret)
return _FAIL;
xmitframe_swencrypt(padapter, pxmitframe);
@ -1188,8 +1183,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
else
pattrib->vcs_mode = NONE_VCS;
exit:
return res;
return _SUCCESS;
}
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */