Skip to content

Commit 6a4df8d

Browse files
committed
Merge: [RHEL9.5 P1] team: stable backport from upstream
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3954 JIRA: https://issues.redhat.com/browse/RHEL-31052 Signed-off-by: Hangbin Liu <haliu@redhat.com> Approved-by: Xin Long <lxin@redhat.com> Approved-by: Aaron Conole <aconole@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 9d76deb + 9528656 commit 6a4df8d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/team/team.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,10 @@ static int __team_options_register(struct team *team,
285285
return 0;
286286

287287
inst_rollback:
288-
for (i--; i >= 0; i--)
288+
for (i--; i >= 0; i--) {
289289
__team_option_inst_del_option(team, dst_opts[i]);
290+
list_del(&dst_opts[i]->list);
291+
}
290292

291293
i = option_count;
292294
alloc_rollback:
@@ -2331,8 +2333,7 @@ static struct team *team_nl_team_get(struct genl_info *info)
23312333
ifindex = nla_get_u32(info->attrs[TEAM_ATTR_TEAM_IFINDEX]);
23322334
dev = dev_get_by_index(net, ifindex);
23332335
if (!dev || dev->netdev_ops != &team_netdev_ops) {
2334-
if (dev)
2335-
dev_put(dev);
2336+
dev_put(dev);
23362337
return NULL;
23372338
}
23382339

0 commit comments

Comments
 (0)