summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-09-17 11:54:15 +0100
committerJohannes Berg <johannes.berg@intel.com>2012-09-18 19:54:05 +0200
commitf3baed51f44dd6b6c7076d2de24d8aed291d8130 (patch)
tree9f1de10a1917fad18e0fdb8d074a1d71176790fe /net
parent9385d04f2872057a2029901190391fe192b18693 (diff)
downloadblackbird-obmc-linux-f3baed51f44dd6b6c7076d2de24d8aed291d8130.tar.gz
blackbird-obmc-linux-f3baed51f44dd6b6c7076d2de24d8aed291d8130.zip
wireless: remove unreachable code
The only case where intersected_rd can become non NULL is within an if. All paths from that if return, so the end chunk has therefore squawked its last and is no more. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/reg.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1ad04e54014c..0ba3328dcc9a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2193,7 +2193,6 @@ static void print_regdomain_info(const struct ieee80211_regdomain *rd)
static int __set_regdom(const struct ieee80211_regdomain *rd)
{
const struct ieee80211_regdomain *intersected_rd = NULL;
- struct cfg80211_registered_device *rdev = NULL;
struct wiphy *request_wiphy;
/* Some basic sanity checks first */
@@ -2305,24 +2304,7 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
return 0;
}
- if (!intersected_rd)
- return -EINVAL;
-
- rdev = wiphy_to_dev(request_wiphy);
-
- rdev->country_ie_alpha2[0] = rd->alpha2[0];
- rdev->country_ie_alpha2[1] = rd->alpha2[1];
- rdev->env = last_request->country_ie_env;
-
- BUG_ON(intersected_rd == rd);
-
- kfree(rd);
- rd = NULL;
-
- reset_regdomains(false);
- cfg80211_regdomain = intersected_rd;
-
- return 0;
+ return -EINVAL;
}
OpenPOWER on IntegriCloud