summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-12-13 11:24:49 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-12-13 11:49:29 +0300
commitb11919e1bb7f6f6273f5a33947b8496da2769eb8 (patch)
treef2ff877b9b0363f8fc97f1c94316f763904ec41f /net/dsa
parentd1c722867f8022a27182b9a1d84e9bca75486c9a (diff)
parente095493091e850d5292ad01d8fbf5cde1d89ac53 (diff)
downloadlinux-b11919e1bb7f6f6273f5a33947b8496da2769eb8.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in the left-over fixes before the net-next pull-request. net/mptcp/subflow.c d3295fee3c75 ("mptcp: use proper req destructor for IPv6") 36b122baf6a8 ("mptcp: add subflow_v(4,6)_send_synack()") Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/tag_8021q.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c
index b1263917fcb2..5ee9ef00954e 100644
--- a/net/dsa/tag_8021q.c
+++ b/net/dsa/tag_8021q.c
@@ -415,6 +415,7 @@ static void dsa_tag_8021q_teardown(struct dsa_switch *ds)
int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto)
{
struct dsa_8021q_context *ctx;
+ int err;
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx)
@@ -427,7 +428,15 @@ int dsa_tag_8021q_register(struct dsa_switch *ds, __be16 proto)
ds->tag_8021q_ctx = ctx;
- return dsa_tag_8021q_setup(ds);
+ err = dsa_tag_8021q_setup(ds);
+ if (err)
+ goto err_free;
+
+ return 0;
+
+err_free:
+ kfree(ctx);
+ return err;
}
EXPORT_SYMBOL_GPL(dsa_tag_8021q_register);