wifi: mac80211: Don't finalize CSA in IBSS mode if state is disconnected
[platform/kernel/linux-rpi.git] / net / mac80211 / sta_info.c
index 2b5acb3..6eeef7a 100644 (file)
@@ -641,13 +641,13 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
        /* check if STA exists already */
        if (sta_info_get_bss(sdata, sta->sta.addr)) {
                err = -EEXIST;
-               goto out_err;
+               goto out_cleanup;
        }
 
        sinfo = kzalloc(sizeof(struct station_info), GFP_KERNEL);
        if (!sinfo) {
                err = -ENOMEM;
-               goto out_err;
+               goto out_cleanup;
        }
 
        local->num_sta++;
@@ -703,8 +703,8 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
  out_drop_sta:
        local->num_sta--;
        synchronize_net();
+ out_cleanup:
        cleanup_single_sta(sta);
- out_err:
        mutex_unlock(&local->sta_mtx);
        kfree(sinfo);
        rcu_read_lock();