diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 0990059f7e48..4f877535e666 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -989,6 +989,9 @@ void regulatory_hint_11d(struct wiphy *wiphy, | |||
989 | u32 checksum = 0; | 989 | u32 checksum = 0; |
990 | enum environment_cap env = ENVIRON_ANY; | 990 | enum environment_cap env = ENVIRON_ANY; |
991 | 991 | ||
992 | if (!last_request) | ||
993 | return; | ||
994 | |||
992 | mutex_lock(&cfg80211_drv_mutex); | 995 | mutex_lock(&cfg80211_drv_mutex); |
993 | 996 | ||
994 | /* IE len must be evenly divisible by 2 */ | 997 | /* IE len must be evenly divisible by 2 */ |
@@ -1330,7 +1333,7 @@ int set_regdom(const struct ieee80211_regdomain *rd) | |||
1330 | /* Caller must hold cfg80211_drv_mutex */ | 1333 | /* Caller must hold cfg80211_drv_mutex */ |
1331 | void reg_device_remove(struct wiphy *wiphy) | 1334 | void reg_device_remove(struct wiphy *wiphy) |
1332 | { | 1335 | { |
1333 | if (!last_request->wiphy) | 1336 | if (!last_request || !last_request->wiphy) |
1334 | return; | 1337 | return; |
1335 | if (last_request->wiphy != wiphy) | 1338 | if (last_request->wiphy != wiphy) |
1336 | return; | 1339 | return; |