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,7 +135,9 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) ...@@ -135,7 +135,9 @@ 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)
return _SUCCESS;
/* delete all reordering_ctrl_timer */ /* delete all reordering_ctrl_timer */
spin_lock_bh(&pstapriv->sta_hash_lock); spin_lock_bh(&pstapriv->sta_hash_lock);
for (index = 0; index < NUM_STA; index++) { for (index = 0; index < NUM_STA; index++) {
...@@ -145,8 +147,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) ...@@ -145,8 +147,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
while (phead != plist) { while (phead != plist) {
int i; int i;
psta = container_of(plist, struct sta_info, psta = container_of(plist, struct sta_info, hash_list);
hash_list);
plist = plist->next; plist = plist->next;
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
...@@ -156,10 +157,8 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) ...@@ -156,10 +157,8 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
} }
} }
spin_unlock_bh(&pstapriv->sta_hash_lock); spin_unlock_bh(&pstapriv->sta_hash_lock);
/*===============================*/
vfree(pstapriv->pallocated_stainfo_buf); 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