diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/key.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 3e51dd7d98b3..ab8468047200 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -260,6 +260,10 @@ static void ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, int idx; bool defunikey, defmultikey, defmgmtkey; + /* caller must provide at least one old/new */ + if (WARN_ON(!new && !old)) + return; + if (new) list_add_tail(&new->list, &sdata->key_list); |