Skip to content

Commit

Permalink
net: bridge: Exit if multicast_init_stats fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Breno Leitao authored and Jakub Kicinski committed Feb 29, 2024
1 parent d35150c commit 82a48af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 82a48af

Please sign in to comment.