summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 0990059f7e4..4f877535e66 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -989,6 +989,9 @@ void regulatory_hint_11d(struct wiphy *wiphy,
u32 checksum = 0;
enum environment_cap env = ENVIRON_ANY;
+ if (!last_request)
+ return;
+
mutex_lock(&cfg80211_drv_mutex);
/* IE len must be evenly divisible by 2 */
@@ -1330,7 +1333,7 @@ int set_regdom(const struct ieee80211_regdomain *rd)
/* Caller must hold cfg80211_drv_mutex */
void reg_device_remove(struct wiphy *wiphy)
{
- if (!last_request->wiphy)
+ if (!last_request || !last_request->wiphy)
return;
if (last_request->wiphy != wiphy)
return;