Skip to content

Commit

Permalink
cfg80211: fix wiphy remove if no regulatory request
Browse files Browse the repository at this point in the history
Fixes the segfault I just pointed out.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 5, 2008
1 parent 8bef7a1 commit 4a4f4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a4f4d8

Please sign in to comment.