Commit 24f6d765 authored by zhong jiang's avatar zhong jiang Committed by Johannes Berg

cfg80211: Do not compare with boolean in nl80211_common_reg_change_event

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: default avatarzhong jiang <zhongjiang@huawei.com>
Link: https://lore.kernel.org/r/1567657537-65472-1-git-send-email-zhongjiang@huawei.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 4b08d1b6
...@@ -14997,12 +14997,10 @@ void nl80211_common_reg_change_event(enum nl80211_commands cmd_id, ...@@ -14997,12 +14997,10 @@ void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
return; return;
hdr = nl80211hdr_put(msg, 0, 0, 0, cmd_id); hdr = nl80211hdr_put(msg, 0, 0, 0, cmd_id);
if (!hdr) { if (!hdr)
nlmsg_free(msg); goto nla_put_failure;
return;
}
if (nl80211_reg_change_event_fill(msg, request) == false) if (!nl80211_reg_change_event_fill(msg, request))
goto nla_put_failure; goto nla_put_failure;
genlmsg_end(msg, hdr); genlmsg_end(msg, hdr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment