summaryrefslogtreecommitdiff
path: root/net/phonet/pn_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r--net/phonet/pn_dev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index af49db01d634..fd418107652b 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -190,9 +190,13 @@ static struct notifier_block phonet_device_notifier = {
/* Initialize Phonet devices list */
int __init phonet_device_init(void)
{
+ int err;
+
register_netdevice_notifier(&phonet_device_notifier);
- phonet_netlink_register();
- return 0;
+ err = phonet_netlink_register();
+ if (err)
+ phonet_device_exit();
+ return err;
}
void phonet_device_exit(void)