ath10k: add missing goto
authorMichal Kazior <michal.kazior@tieto.com>
Tue, 25 Nov 2014 14:16:03 +0000 (15:16 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 26 Nov 2014 06:44:01 +0000 (08:44 +0200)
This prevents warning spamming if peer creation
fails during sta_state in some cases.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 982bd48..f364b84 100644 (file)
@@ -3646,9 +3646,11 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
                           arvif->vdev_id, sta->addr, ar->num_peers);
 
                ret = ath10k_peer_create(ar, arvif->vdev_id, sta->addr);
-               if (ret)
+               if (ret) {
                        ath10k_warn(ar, "failed to add peer %pM for vdev %d when adding a new sta: %i\n",
                                    sta->addr, arvif->vdev_id, ret);
+                       goto exit;
+               }
 
                if (vif->type == NL80211_IFTYPE_STATION) {
                        WARN_ON(arvif->is_started);