Skip to content

Commit

Permalink
cfg80211: Do not compare with boolean in nl80211_common_reg_change_event
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhong jiang authored and Johannes Berg committed Sep 11, 2019
1 parent 4b08d1b commit 24f6d76
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 24f6d76

Please sign in to comment.