summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorJohannes Berg2008-12-01 12:07:56 +0100
committerJohn W. Linville2008-12-05 15:35:45 +0100
commit4a4f4d805db5c930ee4185162dcdc8db9a0379d5 (patch)
treeecda44146ae7936ada0e83b00245aeb63e1088bf /net/wireless/reg.c
parentmac80211: document ieee80211_tx_info.pad (diff)
downloadkernel-qcow2-linux-4a4f4d805db5c930ee4185162dcdc8db9a0379d5.tar.gz
kernel-qcow2-linux-4a4f4d805db5c930ee4185162dcdc8db9a0379d5.tar.xz
kernel-qcow2-linux-4a4f4d805db5c930ee4185162dcdc8db9a0379d5.zip
cfg80211: fix wiphy remove if no regulatory request
Fixes the segfault I just pointed out. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 0990059f7e48..9e5a9f975478 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1330,7 +1330,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;