提交 5282c3ba 编写于 作者: J Johannes Berg

mac80211: verify ieee80211_key_replace() arguments

There's no code calling ieee80211_key_replace() with both
arguments NULL and it wouldn't make sense, but in the
interest of maintainability add a warning for it. As a
side effect, this also shuts up a smatch warning.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 00c3a6ed
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册