From: Johannes Berg Date: Mon, 1 Dec 2008 11:07:56 +0000 (+0100) Subject: cfg80211: fix wiphy remove if no regulatory request X-Git-Tag: v2.6.29-rc1~581^2~305^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a4f4d805db5c930ee4185162dcdc8db9a0379d5;p=profile%2Fivi%2Fkernel-x86-ivi.git cfg80211: fix wiphy remove if no regulatory request Fixes the segfault I just pointed out. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 0990059..9e5a9f9 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;