|
@@ -2095,11 +2095,12 @@ int set_regdom(const struct ieee80211_regdomain *rd)
|
|
/* Caller must hold cfg80211_mutex */
|
|
/* Caller must hold cfg80211_mutex */
|
|
void reg_device_remove(struct wiphy *wiphy)
|
|
void reg_device_remove(struct wiphy *wiphy)
|
|
{
|
|
{
|
|
- struct wiphy *request_wiphy;
|
|
|
|
|
|
+ struct wiphy *request_wiphy = NULL;
|
|
|
|
|
|
assert_cfg80211_lock();
|
|
assert_cfg80211_lock();
|
|
|
|
|
|
- request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
|
|
|
|
|
|
+ if (last_request)
|
|
|
|
+ request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
|
|
|
|
|
|
kfree(wiphy->regd);
|
|
kfree(wiphy->regd);
|
|
if (!last_request || !request_wiphy)
|
|
if (!last_request || !request_wiphy)
|