Commit 4a4f4d80 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

cfg80211: fix wiphy remove if no regulatory request

Fixes the segfault I just pointed out.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8bef7a10
...@@ -1330,7 +1330,7 @@ int set_regdom(const struct ieee80211_regdomain *rd) ...@@ -1330,7 +1330,7 @@ int set_regdom(const struct ieee80211_regdomain *rd)
/* Caller must hold cfg80211_drv_mutex */ /* Caller must hold cfg80211_drv_mutex */
void reg_device_remove(struct wiphy *wiphy) void reg_device_remove(struct wiphy *wiphy)
{ {
if (!last_request->wiphy) if (!last_request || !last_request->wiphy)
return; return;
if (last_request->wiphy != wiphy) if (last_request->wiphy != wiphy)
return; return;
......
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