diff options
author | linke li <lilinke99@qq.com> | 2024-04-23 12:53:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-25 14:15:38 +0200 |
commit | e7d96e750f2bc9b951290c90df421ac5e9adc3ed (patch) | |
tree | 041f42afb530450dff2200382e8071ece56dd095 | |
parent | net: dsa: mv88e6xxx: Avoid EEPROM timeout without EEPROM on 88E6250-family sw... (diff) | |
download | linux-e7d96e750f2bc9b951290c90df421ac5e9adc3ed.tar.xz linux-e7d96e750f2bc9b951290c90df421ac5e9adc3ed.zip |
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>
-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); |