Skip to content

Commit

Permalink
team: fix checks in team_get_first_port_txable_rcu()
Browse files Browse the repository at this point in the history
should be checked if "cur" is txable, not "port".

Introduced by commit 6e88e13 "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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 12, 2013
1 parent 72df935 commit b79462a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/if_team.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b79462a

Please sign in to comment.