Commit e5dfb941 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: fix another key installation error path

Due to overlapping changes and merges, another error
path ended up broken. Fix this one as well.
Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8e4687f6
...@@ -881,8 +881,10 @@ int ieee80211_key_link(struct ieee80211_key *key, ...@@ -881,8 +881,10 @@ int ieee80211_key_link(struct ieee80211_key *key,
if (link_id >= 0) { if (link_id >= 0) {
link_sta = rcu_dereference_protected(sta->link[link_id], link_sta = rcu_dereference_protected(sta->link[link_id],
lockdep_is_held(&sta->local->hw.wiphy->mtx)); lockdep_is_held(&sta->local->hw.wiphy->mtx));
if (!link_sta) if (!link_sta) {
return -ENOLINK; ret = -ENOLINK;
goto out;
}
} }
old_key = wiphy_dereference(sdata->local->hw.wiphy, old_key = wiphy_dereference(sdata->local->hw.wiphy,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment