diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-24 20:32:20 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:02:30 -0400 |
commit | d2372b315289aec9f565a855023c40654a5bff68 (patch) | |
tree | cfc73e74dfdea854dd27b747d68224076d8e8d90 /net/wireless/nl80211.c | |
parent | 7dddaf1a36a372c14ca96a0b5fdfbe2015c43841 (diff) | |
download | blackbird-op-linux-d2372b315289aec9f565a855023c40654a5bff68.tar.gz blackbird-op-linux-d2372b315289aec9f565a855023c40654a5bff68.zip |
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.c | 5 |
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) mutex_lock(&cfg80211_drv_mutex); r = set_regdom(rd); mutex_unlock(&cfg80211_drv_mutex); - if (r) - goto bad_reg; - return r; -bad_reg: + bad_reg: kfree(rd); return -EINVAL; } |