Commit 6e845ddd authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: rtl8188eu: reduce indentation level in _rtw_free_sta_priv

Reduce indentation level in _rtw_free_sta_priv by returning early if
pstapriv is NULL. Also clears a line over 80 characters checkpatch
warning.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20191027130604.68379-2-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c9f7222
...@@ -135,31 +135,30 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) ...@@ -135,31 +135,30 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
struct recv_reorder_ctrl *preorder_ctrl; struct recv_reorder_ctrl *preorder_ctrl;
int index; int index;
if (pstapriv) { if (!pstapriv)
/* delete all reordering_ctrl_timer */ return _SUCCESS;
spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) { /* delete all reordering_ctrl_timer */
phead = &pstapriv->sta_hash[index]; spin_lock_bh(&pstapriv->sta_hash_lock);
plist = phead->next; for (index = 0; index < NUM_STA; index++) {
phead = &pstapriv->sta_hash[index];
while (phead != plist) { plist = phead->next;
int i;
while (phead != plist) {
psta = container_of(plist, struct sta_info, int i;
hash_list);
plist = plist->next; psta = container_of(plist, struct sta_info, hash_list);
plist = plist->next;
for (i = 0; i < 16; i++) {
preorder_ctrl = &psta->recvreorder_ctrl[i]; for (i = 0; i < 16; i++) {
del_timer_sync(&preorder_ctrl->reordering_ctrl_timer); preorder_ctrl = &psta->recvreorder_ctrl[i];
} del_timer_sync(&preorder_ctrl->reordering_ctrl_timer);
} }
} }
spin_unlock_bh(&pstapriv->sta_hash_lock);
/*===============================*/
vfree(pstapriv->pallocated_stainfo_buf);
} }
spin_unlock_bh(&pstapriv->sta_hash_lock);
vfree(pstapriv->pallocated_stainfo_buf);
return _SUCCESS; return _SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment