aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r--net/bridge/br_netlink.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 97ba0189c6f7..5dc66abcc9e2 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -299,10 +299,21 @@ struct rtnl_link_ops br_link_ops __read_mostly = {
299 299
300int __init br_netlink_init(void) 300int __init br_netlink_init(void)
301{ 301{
302 return rtnl_link_register(&br_link_ops); 302 int err;
303
304 br_mdb_init();
305 err = rtnl_link_register(&br_link_ops);
306 if (err)
307 goto out;
308
309 return 0;
310out:
311 br_mdb_uninit();
312 return err;
303} 313}
304 314
305void __exit br_netlink_fini(void) 315void __exit br_netlink_fini(void)
306{ 316{
317 br_mdb_uninit();
307 rtnl_link_unregister(&br_link_ops); 318 rtnl_link_unregister(&br_link_ops);
308} 319}