mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
staging: r8188eu: simplify rtw_make_wlanhdr's error handling
Simplify the error handling in rtw_make_wlanhdr. Exit immediately instead of jumping to the end of the function. We don't have to do any clean-up. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e263d79eb1
commit
a6b25e291f
|
|
@ -792,8 +792,6 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
||||
u8 qos_option = false;
|
||||
|
||||
int res = _SUCCESS;
|
||||
__le16 *fctrl = &pwlanhdr->frame_control;
|
||||
|
||||
struct sta_info *psta;
|
||||
|
|
@ -840,8 +838,7 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
|
|||
if (psta->qos_option)
|
||||
qos_option = true;
|
||||
} else {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
if (pattrib->mdata)
|
||||
|
|
@ -897,9 +894,8 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr
|
|||
}
|
||||
}
|
||||
}
|
||||
exit:
|
||||
|
||||
return res;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
s32 rtw_txframes_pending(struct adapter *padapter)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user