|
@@ -513,23 +513,23 @@ static int sta_info_insert_finish(struct sta_info *sta) __acquires(RCU)
|
|
{
|
|
{
|
|
struct ieee80211_local *local = sta->local;
|
|
struct ieee80211_local *local = sta->local;
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
struct ieee80211_sub_if_data *sdata = sta->sdata;
|
|
- struct station_info *sinfo;
|
|
|
|
|
|
+ struct station_info *sinfo = NULL;
|
|
int err = 0;
|
|
int err = 0;
|
|
|
|
|
|
lockdep_assert_held(&local->sta_mtx);
|
|
lockdep_assert_held(&local->sta_mtx);
|
|
|
|
|
|
- sinfo = kzalloc(sizeof(struct station_info), GFP_KERNEL);
|
|
|
|
- if (!sinfo) {
|
|
|
|
- err = -ENOMEM;
|
|
|
|
- goto out_err;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* check if STA exists already */
|
|
/* check if STA exists already */
|
|
if (sta_info_get_bss(sdata, sta->sta.addr)) {
|
|
if (sta_info_get_bss(sdata, sta->sta.addr)) {
|
|
err = -EEXIST;
|
|
err = -EEXIST;
|
|
goto out_err;
|
|
goto out_err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ sinfo = kzalloc(sizeof(struct station_info), GFP_KERNEL);
|
|
|
|
+ if (!sinfo) {
|
|
|
|
+ err = -ENOMEM;
|
|
|
|
+ goto out_err;
|
|
|
|
+ }
|
|
|
|
+
|
|
local->num_sta++;
|
|
local->num_sta++;
|
|
local->sta_generation++;
|
|
local->sta_generation++;
|
|
smp_mb();
|
|
smp_mb();
|