]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: remove unnecessary genlmsg_cancel() calls
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 Jan 2018 22:07:06 +0000 (23:07 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Feb 2018 12:16:37 +0000 (13:16 +0100)
commitf07f44dfd588135490a2d1d1650ec35a7e6aab4b
tree87ab9bd5579839647cc758cfc4118ba32513a82f
parent76f75896738676d341ca63319867ae8b1b86500a
nl80211: remove unnecessary genlmsg_cancel() calls

If we free the message immediately, there's no reason to
trim it back to the previous size.

Done with spatch:

@@
identifier msg, hdr;
@@
-if (hdr)
-  genlmsg_cancel(msg, hdr);
... when != msg;
 nlmsg_free(msg);

@@
identifier msg, hdr;
@@
-genlmsg_cancel(msg, hdr);
... when != msg;
 nlmsg_free(msg);

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c