projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dad640
)
nl80211: clarify nl80211_set_reg() success path
author
Johannes Berg
<johannes.berg@intel.com>
Thu, 9 Jun 2016 08:40:09 +0000
(10:40 +0200)
committer
Johannes Berg
<johannes.berg@intel.com>
Thu, 9 Jun 2016 08:41:19 +0000
(10:41 +0200)
Setting rd to NULL to avoid freeing it, just to be able to return
from the function in a single place, doesn't make much sense.
Return the set_regdom() return value directly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
patch
|
blob
|
history
diff --git
a/net/wireless/nl80211.c
b/net/wireless/nl80211.c
index
0d7db10
..
c503e96
100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-5836,10
+5836,8
@@
static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
}
}
- r = set_regdom(rd, REGD_SOURCE_CRDA);
- /* set_regdom took ownership */
- rd = NULL;
-
+ /* set_regdom takes ownership of rd */
+ return set_regdom(rd, REGD_SOURCE_CRDA);
bad_reg:
kfree(rd);
return r;