diff options
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index caa3f6919436..39ca9796f3f7 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c | |||
@@ -302,10 +302,21 @@ struct rtnl_link_ops br_link_ops __read_mostly = { | |||
302 | 302 | ||
303 | int __init br_netlink_init(void) | 303 | int __init br_netlink_init(void) |
304 | { | 304 | { |
305 | return rtnl_link_register(&br_link_ops); | 305 | int err; |
306 | |||
307 | br_mdb_init(); | ||
308 | err = rtnl_link_register(&br_link_ops); | ||
309 | if (err) | ||
310 | goto out; | ||
311 | |||
312 | return 0; | ||
313 | out: | ||
314 | br_mdb_uninit(); | ||
315 | return err; | ||
306 | } | 316 | } |
307 | 317 | ||
308 | void __exit br_netlink_fini(void) | 318 | void __exit br_netlink_fini(void) |
309 | { | 319 | { |
320 | br_mdb_uninit(); | ||
310 | rtnl_link_unregister(&br_link_ops); | 321 | rtnl_link_unregister(&br_link_ops); |
311 | } | 322 | } |