Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;