Commit 82a48aff authored by Breno Leitao's avatar Breno Leitao Committed by Jakub Kicinski

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: default avatarBreno Leitao <leitao@debian.org>
Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20240227182338.2739884-2-leitao@debian.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d35150c7
...@@ -135,10 +135,11 @@ static int br_dev_init(struct net_device *dev) ...@@ -135,10 +135,11 @@ static int br_dev_init(struct net_device *dev)
br_vlan_flush(br); br_vlan_flush(br);
br_mdb_hash_fini(br); br_mdb_hash_fini(br);
br_fdb_hash_fini(br); br_fdb_hash_fini(br);
return err;
} }
netdev_lockdep_set_classes(dev); netdev_lockdep_set_classes(dev);
return err; return 0;
} }
static void br_dev_uninit(struct net_device *dev) static void br_dev_uninit(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment