Commit b79462a8 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

team: fix checks in team_get_first_port_txable_rcu()

should be checked if "cur" is txable, not "port".

Introduced by commit 6e88e135 "team: use function team_port_txable()
for determing enabled and up port"
Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 72df935d
......@@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
return port;
cur = port;
list_for_each_entry_continue_rcu(cur, &team->port_list, list)
if (team_port_txable(port))
if (team_port_txable(cur))
return cur;
list_for_each_entry_rcu(cur, &team->port_list, list) {
if (cur == port)
break;
if (team_port_txable(port))
if (team_port_txable(cur))
return cur;
}
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment