summaryrefslogtreecommitdiff
path: root/net/core/devlink.c
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 /net/core/devlink.c
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 'net/core/devlink.c')
-rw-r--r--net/core/devlink.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 475246b355f0..f75ee022e6b2 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -1826,7 +1826,6 @@ send_done:
nla_put_failure:
err = -EMSGSIZE;
err_table_put:
- genlmsg_cancel(skb, hdr);
nlmsg_free(skb);
return err;
}
@@ -2032,7 +2031,6 @@ int devlink_dpipe_entry_ctx_prepare(struct devlink_dpipe_dump_ctx *dump_ctx)
return 0;
nla_put_failure:
- genlmsg_cancel(dump_ctx->skb, dump_ctx->hdr);
nlmsg_free(dump_ctx->skb);
return -EMSGSIZE;
}
@@ -2249,7 +2247,6 @@ send_done:
nla_put_failure:
err = -EMSGSIZE;
err_table_put:
- genlmsg_cancel(skb, hdr);
nlmsg_free(skb);
return err;
}
@@ -2551,7 +2548,6 @@ nla_put_failure:
err = -EMSGSIZE;
err_resource_put:
err_skb_send_alloc:
- genlmsg_cancel(skb, hdr);
nlmsg_free(skb);
return err;
}