summaryrefslogtreecommitdiffstats
path: root/drivers/net/team/team_mode_roundrobin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team/team_mode_roundrobin.c')
-rw-r--r--drivers/net/team/team_mode_roundrobin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/team/team_mode_roundrobin.c b/drivers/net/team/team_mode_roundrobin.c
index 90311c7375f..53665850b59 100644
--- a/drivers/net/team/team_mode_roundrobin.c
+++ b/drivers/net/team/team_mode_roundrobin.c
@@ -33,6 +33,8 @@ static bool rr_transmit(struct team *team, struct sk_buff *skb)
port_index = team_num_to_port_index(team,
rr_priv(team)->sent_packets++);
port = team_get_port_by_index_rcu(team, port_index);
+ if (unlikely(!port))
+ goto drop;
port = team_get_first_port_txable_rcu(team, port);
if (unlikely(!port))
goto drop;