summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-05-26 14:15:48 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-29 16:53:38 +0300
commitc1c9a3c9663b2e15176758626278792862f1ed32 (patch)
treea227c72136a62865d12af106a354c3bb522adb16 /drivers
parent77ab8d5d2950cd0e18ba943336c1172b46e9f53e (diff)
downloadlinux-c1c9a3c9663b2e15176758626278792862f1ed32.tar.xz
net: remove unnecessary genlmsg_cancel() calls
the message be freed immediately, no need to trim it back to the previous size. Inspired by commit 7a9b3ec1e19f ("nl80211: remove unnecessary genlmsg_cancel() calls") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/team/team.c2
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c1
2 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index e6730a01d130..267dcc929f6c 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2426,7 +2426,6 @@ send_done:
nla_put_failure:
err = -EMSGSIZE;
errout:
- genlmsg_cancel(skb, hdr);
nlmsg_free(skb);
return err;
}
@@ -2720,7 +2719,6 @@ send_done:
nla_put_failure:
err = -EMSGSIZE;
errout:
- genlmsg_cancel(skb, hdr);
nlmsg_free(skb);
return err;
}
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 89fc22520d40..9825bfd42abc 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2514,7 +2514,6 @@ static void hwsim_mcast_new_radio(int id, struct genl_info *info,
return;
out_err:
- genlmsg_cancel(mcast_skb, data);
nlmsg_free(mcast_skb);
}