aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 48baf28cc4b6..f180db0de66c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1306,6 +1306,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
1306{ 1306{
1307 int r = 0; 1307 int r = 0;
1308 struct wiphy *wiphy = NULL; 1308 struct wiphy *wiphy = NULL;
1309 enum nl80211_reg_initiator initiator = reg_request->initiator;
1309 1310
1310 BUG_ON(!reg_request->alpha2); 1311 BUG_ON(!reg_request->alpha2);
1311 1312
@@ -1325,7 +1326,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
1325 /* This is required so that the orig_* parameters are saved */ 1326 /* This is required so that the orig_* parameters are saved */
1326 if (r == -EALREADY && wiphy && 1327 if (r == -EALREADY && wiphy &&
1327 wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) 1328 wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
1328 wiphy_update_regulatory(wiphy, reg_request->initiator); 1329 wiphy_update_regulatory(wiphy, initiator);
1329out: 1330out:
1330 mutex_unlock(&reg_mutex); 1331 mutex_unlock(&reg_mutex);
1331 mutex_unlock(&cfg80211_mutex); 1332 mutex_unlock(&cfg80211_mutex);
@@ -1492,7 +1493,6 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1492 u8 *country_ie, 1493 u8 *country_ie,
1493 u8 country_ie_len) 1494 u8 country_ie_len)
1494{ 1495{
1495 struct ieee80211_regdomain *rd = NULL;
1496 char alpha2[2]; 1496 char alpha2[2];
1497 enum environment_cap env = ENVIRON_ANY; 1497 enum environment_cap env = ENVIRON_ANY;
1498 struct regulatory_request *request; 1498 struct regulatory_request *request;
@@ -1529,7 +1529,7 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1529 1529
1530 request = kzalloc(sizeof(struct regulatory_request), GFP_KERNEL); 1530 request = kzalloc(sizeof(struct regulatory_request), GFP_KERNEL);
1531 if (!request) 1531 if (!request)
1532 goto free_rd_out; 1532 goto out;
1533 1533
1534 request->wiphy_idx = get_wiphy_idx(wiphy); 1534 request->wiphy_idx = get_wiphy_idx(wiphy);
1535 request->alpha2[0] = alpha2[0]; 1535 request->alpha2[0] = alpha2[0];
@@ -1543,8 +1543,6 @@ void regulatory_hint_11d(struct wiphy *wiphy,
1543 1543
1544 return; 1544 return;
1545 1545
1546free_rd_out:
1547 kfree(rd);
1548out: 1546out:
1549 mutex_unlock(&reg_mutex); 1547 mutex_unlock(&reg_mutex);
1550} 1548}