summaryrefslogtreecommitdiff
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-12-05 11:48:58 -0800
committerJakub Kicinski <kuba@kernel.org>2024-12-12 14:19:05 -0800
commit5098462fbac60cbec76171a8b4998a36b85891a1 (patch)
treee9d6b62251ba4a670216f12390cc1ccad8148569 /net/core/rtnetlink.c
parentf3674384709b69c5cd8c4597b8bd73ea7bd0236f (diff)
parent150b567e0d572342ef08bace7ee7aff80fd75327 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.13-rc3). No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 8fe252c298a2..d9e363d9fa31 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -3972,8 +3972,10 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,
if (ops->peer_type) {
peer_net = rtnl_get_peer_net(ops, data, extack);
- if (IS_ERR(peer_net))
+ if (IS_ERR(peer_net)) {
+ ret = PTR_ERR(peer_net);
goto put_ops;
+ }
if (peer_net)
rtnl_nets_add(&rtnl_nets, peer_net);
}