提交 0ef9ccdd 编写于 作者: C Chris Wright 提交者: John W. Linville

cfg80211: remove superfluous !last_request check in reg_device_remove()

Commit 0ad8acaf "cfg80211: fix NULL pointer deference in
reg_device_remove()" added a check that last_request is non-NULL,
rendering the 2nd check superfluous.  While there, rearrange the code a
bit so it's a little more straight forward.
Signed-off-by: NChris Wright <chrisw@sous-sol.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 2cfb1f5e
......@@ -2100,14 +2100,14 @@ void reg_device_remove(struct wiphy *wiphy)
assert_cfg80211_lock();
kfree(wiphy->regd);
if (last_request)
request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
kfree(wiphy->regd);
if (!last_request || !request_wiphy)
return;
if (request_wiphy != wiphy)
if (!request_wiphy || request_wiphy != wiphy)
return;
last_request->wiphy_idx = WIPHY_IDX_STALE;
last_request->country_ie_env = ENVIRON_ANY;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册