Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
[powerpc.git] / net / bridge / br.c
index 558d272..848b8fa 100644 (file)
@@ -13,7 +13,6 @@
  *     2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
@@ -38,7 +37,9 @@ static int __init br_init(void)
                return -EADDRINUSE;
        }
 
-       br_fdb_init();
+       err = br_fdb_init();
+       if (err)
+               goto err_out1;
 
        err = br_netfilter_init();
        if (err)
@@ -48,6 +49,10 @@ static int __init br_init(void)
        if (err)
                goto err_out2;
 
+       err = br_netlink_init();
+       if (err)
+               goto err_out3;
+
        brioctl_set(br_ioctl_deviceless_stub);
        br_handle_frame_hook = br_handle_frame;
 
@@ -55,7 +60,8 @@ static int __init br_init(void)
        br_fdb_put_hook = br_fdb_put;
 
        return 0;
-
+err_out3:
+       unregister_netdevice_notifier(&br_device_notifier);
 err_out2:
        br_netfilter_fini();
 err_out1:
@@ -67,6 +73,7 @@ static void __exit br_deinit(void)
 {
        rcu_assign_pointer(br_stp_sap->rcv_func, NULL);
 
+       br_netlink_fini();
        br_netfilter_fini();
        unregister_netdevice_notifier(&br_device_notifier);
        brioctl_set(NULL);