aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-24 14:32:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:02:30 -0400
commitd2372b315289aec9f565a855023c40654a5bff68 (patch)
treecfc73e74dfdea854dd27b747d68224076d8e8d90 /net/wireless/nl80211.c
parent7dddaf1a36a372c14ca96a0b5fdfbe2015c43841 (diff)
wireless: make regdom passing semantics simpler
The regdom struct is given to the core, so it might as well free it in error conditions. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9a16e9e6c5ca..f82cc9aa6908 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1935,12 +1935,9 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
1935 mutex_lock(&cfg80211_drv_mutex); 1935 mutex_lock(&cfg80211_drv_mutex);
1936 r = set_regdom(rd); 1936 r = set_regdom(rd);
1937 mutex_unlock(&cfg80211_drv_mutex); 1937 mutex_unlock(&cfg80211_drv_mutex);
1938 if (r)
1939 goto bad_reg;
1940
1941 return r; 1938 return r;
1942 1939
1943bad_reg: 1940 bad_reg:
1944 kfree(rd); 1941 kfree(rd);
1945 return -EINVAL; 1942 return -EINVAL;
1946} 1943}