summaryrefslogtreecommitdiff
path: root/drivers/net/team/team_mode_activebackup.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/team/team_mode_activebackup.c')
-rw-r--r--drivers/net/team/team_mode_activebackup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/team/team_mode_activebackup.c b/drivers/net/team/team_mode_activebackup.c
index c9e7621b4480..2fe02a8713ea 100644
--- a/drivers/net/team/team_mode_activebackup.c
+++ b/drivers/net/team/team_mode_activebackup.c
@@ -61,11 +61,8 @@ static void ab_port_leave(struct team *team, struct team_port *port)
static int ab_active_port_get(struct team *team, struct team_gsetter_ctx *ctx)
{
- struct team_port *active_port;
-
- active_port = rcu_access_pointer(ab_priv(team)->active_port);
- if (active_port)
- ctx->data.u32_val = active_port->dev->ifindex;
+ if (ab_priv(team)->active_port)
+ ctx->data.u32_val = ab_priv(team)->active_port->dev->ifindex;
else
ctx->data.u32_val = 0;
return 0;