projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b08d1b
)
cfg80211: Do not compare with boolean in nl80211_common_reg_change_event
author
zhong jiang
<zhongjiang@huawei.com>
Thu, 5 Sep 2019 04:25:37 +0000
(12:25 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Wed, 11 Sep 2019 07:33:29 +0000
(09:33 +0200)
With the help of boolinit.cocci, we use !nl80211_reg_change_event_fill
instead of (nl80211_reg_change_event_fill == false). Meanwhile, Clean
up the code.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Link:
https://lore.kernel.org/r/1567657537-65472-1-git-send-email-zhongjiang@huawei.com
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 3e30e18d1d89a7991fea2c25c911df542a1bbef6..0c7fa6004ffb255640b4c7cf44793a2b841fe04f 100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-14997,12
+14997,10
@@
void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
return;
hdr = nl80211hdr_put(msg, 0, 0, 0, cmd_id);
- if (!hdr) {
- nlmsg_free(msg);
- return;
- }
+ if (!hdr)
+ goto nla_put_failure;
- if (
nl80211_reg_change_event_fill(msg, request) == false
)
+ if (
!nl80211_reg_change_event_fill(msg, request)
)
goto nla_put_failure;
genlmsg_end(msg, hdr);