Message ID | 20240227182338.2739884-2-leitao@debian.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 82a48affb36f1fee36fe415051a8947d42861108 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,1/2] net: bridge: Do not allocate stats in the driver | expand |
On 2/27/24 20:23, Breno Leitao wrote: > 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> > --- > net/bridge/br_device.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > 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) Please send them as separate patches next time. These are not related and shouldn't be a part of a set. Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
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)
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> --- net/bridge/br_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)