ath10k:mac: disassoc dbg msg after return check
diff mbox series

Message ID 20191111083040.16824-1-eduardoabinader@gmail.com
State Rejected
Delegated to: Kalle Valo
Headers show
Series
  • ath10k:mac: disassoc dbg msg after return check
Related show

Commit Message

Eduardo Abinader Nov. 11, 2019, 8:30 a.m. UTC
Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kalle Valo Nov. 11, 2019, 8:50 a.m. UTC | #1
Eduardo Abinader <eduardoabinader@gmail.com> writes:

> Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>

No empty commit logs, please.

> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -6786,13 +6786,13 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
>  		/*
>  		 * Disassociation.
>  		 */
> -		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
> -			   sta->addr);
> -
>  		ret = ath10k_station_disassoc(ar, vif, sta);
>  		if (ret)
>  			ath10k_warn(ar, "failed to disassociate station: %pM vdev %i: %i\n",
>  				    sta->addr, arvif->vdev_id, ret);
> +		else
> +			ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
> +			   sta->addr);

I don't understand, how is this better?

Patch
diff mbox series

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 5e3450cfb07b..038d5c27bed7 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -6786,13 +6786,13 @@  static int ath10k_sta_state(struct ieee80211_hw *hw,
 		/*
 		 * Disassociation.
 		 */
-		ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
-			   sta->addr);
-
 		ret = ath10k_station_disassoc(ar, vif, sta);
 		if (ret)
 			ath10k_warn(ar, "failed to disassociate station: %pM vdev %i: %i\n",
 				    sta->addr, arvif->vdev_id, ret);
+		else
+			ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta %pM disassociated\n",
+			   sta->addr);
 	}
 exit:
 	mutex_unlock(&ar->conf_mutex);