mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
staging: rtl8723bs: simplify rtw_enqueue_cmd control flow
Replace the goto exit pattern with direct returns to simplify the control flow and improve readability. No functional change intended. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20260513213719.12246-4-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4c6cfd7f25
commit
65f92917a9
|
|
@ -313,18 +313,18 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
|
||||
int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
||||
{
|
||||
int res = _FAIL;
|
||||
int res;
|
||||
struct adapter *padapter = pcmdpriv->padapter;
|
||||
|
||||
if (!cmd_obj)
|
||||
goto exit;
|
||||
return _FAIL;
|
||||
|
||||
cmd_obj->padapter = padapter;
|
||||
|
||||
res = rtw_cmd_filter(pcmdpriv, cmd_obj);
|
||||
if (res == _FAIL) {
|
||||
rtw_free_cmd_obj(cmd_obj);
|
||||
goto exit;
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
|
||||
|
|
@ -332,7 +332,6 @@ int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
if (res == _SUCCESS)
|
||||
complete(&pcmdpriv->cmd_queue_comp);
|
||||
|
||||
exit:
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user