diff options
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 0e67016ce78f..76b35df39623 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2076,6 +2076,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) } request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); + if (!request_wiphy) { + reg_set_request_processed(); + return -ENODEV; + } if (!last_request->intersect) { int r; @@ -2304,6 +2308,9 @@ void /* __init_or_exit */ regulatory_exit(void) kfree(last_request); + last_request = NULL; + dev_set_uevent_suppress(®_pdev->dev, true); + platform_device_unregister(reg_pdev); spin_lock_bh(®_pending_beacons_lock); |