Phonet: handle rtnetlink registration failure
[safe/jmp/linux-2.6] / net / phonet / pn_dev.c
index 5491bf5..fd41810 100644 (file)
@@ -188,9 +188,15 @@ static struct notifier_block phonet_device_notifier = {
 };
 
 /* Initialize Phonet devices list */
-void phonet_device_init(void)
+int __init phonet_device_init(void)
 {
+       int err;
+
        register_netdevice_notifier(&phonet_device_notifier);
+       err = phonet_netlink_register();
+       if (err)
+               phonet_device_exit();
+       return err;
 }
 
 void phonet_device_exit(void)