team: fix checks in team_get_first_port_txable_rcu()
should be checked if "cur" is txable, not "port".
Introduced by commit 6e88e1357c
"team: use function team_port_txable()
for determing enabled and up port"
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
72df935d98
commit
b79462a8b9
|
@ -249,12 +249,12 @@ team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
|
||||||
return port;
|
return port;
|
||||||
cur = port;
|
cur = port;
|
||||||
list_for_each_entry_continue_rcu(cur, &team->port_list, list)
|
list_for_each_entry_continue_rcu(cur, &team->port_list, list)
|
||||||
if (team_port_txable(port))
|
if (team_port_txable(cur))
|
||||||
return cur;
|
return cur;
|
||||||
list_for_each_entry_rcu(cur, &team->port_list, list) {
|
list_for_each_entry_rcu(cur, &team->port_list, list) {
|
||||||
if (cur == port)
|
if (cur == port)
|
||||||
break;
|
break;
|
||||||
if (team_port_txable(port))
|
if (team_port_txable(cur))
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue