From: Jiri Pirko Date: Sat, 8 Jun 2013 13:00:55 +0000 (+0200) Subject: team: fix checks in team_get_first_port_txable_rcu() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b79462a8b9f9a452edc20c64a70a89ba3b0a6a88;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 4474557904f6..16fae6436d0e 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h @@ -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;