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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c9f7222
Loading
Loading
Loading
Loading
+21 −22
Original line number Diff line number Diff line
@@ -135,7 +135,9 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
	struct recv_reorder_ctrl *preorder_ctrl;
	int index;

	if (pstapriv) {
	if (!pstapriv)
		return _SUCCESS;

	/* delete all reordering_ctrl_timer */
	spin_lock_bh(&pstapriv->sta_hash_lock);
	for (index = 0; index < NUM_STA; index++) {
@@ -145,8 +147,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
		while (phead != plist) {
			int i;

				psta = container_of(plist, struct sta_info,
						    hash_list);
			psta = container_of(plist, struct sta_info, hash_list);
			plist = plist->next;

			for (i = 0; i < 16; i++) {
@@ -156,10 +157,8 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
		}
	}
	spin_unlock_bh(&pstapriv->sta_hash_lock);
		/*===============================*/

	vfree(pstapriv->pallocated_stainfo_buf);
	}

	return _SUCCESS;
}