summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2024-02-27 21:23:37 +0300
committerJakub Kicinski <kuba@kernel.org>2024-02-29 07:15:32 +0300
commit82a48affb36f1fee36fe415051a8947d42861108 (patch)
tree5e4a646d21dee9dd08a6b88c8406af1f1d702f7a /net/bridge
parentd35150c79ffcd730e3c9f20cf128288606e3bf3b (diff)
downloadlinux-82a48affb36f1fee36fe415051a8947d42861108.tar.xz
net: bridge: Exit if multicast_init_stats fails
If br_multicast_init_stats() fails, there is no need to set lockdep classes. Just return from the error path. Signed-off-by: Breno Leitao <leitao@debian.org> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Link: https://lore.kernel.org/r/20240227182338.2739884-2-leitao@debian.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 4f636f7b0555..c366ccc8b3db 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -135,10 +135,11 @@ static int br_dev_init(struct net_device *dev)
br_vlan_flush(br);
br_mdb_hash_fini(br);
br_fdb_hash_fini(br);
+ return err;
}
netdev_lockdep_set_classes(dev);
- return err;
+ return 0;
}
static void br_dev_uninit(struct net_device *dev)