Re: [PATCH] staging: rtl8723bs: remove redundant assignments to res

From: Ethan Tidmore

Date: Sat Apr 04 2026 - 18:36:07 EST


On Sat Apr 4, 2026 at 5:09 AM CDT, Hungyu Lin wrote:
> The variable res is already equal to _FAIL when the condition
> (res == _FAIL) is true. The assignments inside the if blocks are
> redundant and can be removed.
>
> No functional change.
>
> Signed-off-by: Hungyu Lin <dennylin0707@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 7b18be8912e6..ea1923023caa 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -209,10 +209,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
> pxmitbuf->buf_tag = XMITBUF_MGNT;
>
> res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, MAX_XMIT_EXTBUF_SZ + XMITBUF_ALIGN_SZ, true);
> - if (res == _FAIL) {
> - res = _FAIL;
> + if (res == _FAIL)
> goto exit;
> - }

Thanks, but it'd be much more useful if these "_SUCCESS" and "_FAIL"
macros where entirely removed instead of trying to clean up this bad
style.

Thanks,

ET