Commit e7d96e75 authored by linke li's avatar linke li Committed by David S. Miller
Browse files

net: bridge: remove redundant check of f->dst



In br_fill_forward_path(), f->dst is checked not to be NULL, then
immediately read using READ_ONCE and checked again. The first check is
useless, so this patch aims to remove the redundant check of f->dst.

Signed-off-by: default avatarlinke li <lilinke99@qq.com>
Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e44894e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ static int br_fill_forward_path(struct net_device_path_ctx *ctx,
	br_vlan_fill_forward_path_pvid(br, ctx, path);

	f = br_fdb_find_rcu(br, ctx->daddr, path->bridge.vlan_id);
	if (!f || !f->dst)
	if (!f)
		return -1;

	dst = READ_ONCE(f->dst);