diff options
author | linke li <lilinke99@qq.com> | 2024-04-23 18:53:26 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-25 13:15:38 +0100 |
commit | e7d96e750f2bc9b951290c90df421ac5e9adc3ed (patch) | |
tree | 041f42afb530450dff2200382e8071ece56dd095 /net/bridge | |
parent | e44894e2aa4eb311ceda134de8b6f51ff979211b (diff) |
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: linke li <lilinke99@qq.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index c366ccc8b3db..ab4d33e02014 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -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); |