aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/connector/connector.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r--drivers/connector/connector.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 37976dcf044b..fea2d3ed9cbd 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -420,8 +420,7 @@ static int __devinit cn_init(void)
420 420
421 dev->cbdev = cn_queue_alloc_dev("cqueue", dev->nls); 421 dev->cbdev = cn_queue_alloc_dev("cqueue", dev->nls);
422 if (!dev->cbdev) { 422 if (!dev->cbdev) {
423 if (dev->nls->sk_socket) 423 netlink_kernel_release(dev->nls);
424 sock_release(dev->nls->sk_socket);
425 return -EINVAL; 424 return -EINVAL;
426 } 425 }
427 426
@@ -431,8 +430,7 @@ static int __devinit cn_init(void)
431 if (err) { 430 if (err) {
432 cn_already_initialized = 0; 431 cn_already_initialized = 0;
433 cn_queue_free_dev(dev->cbdev); 432 cn_queue_free_dev(dev->cbdev);
434 if (dev->nls->sk_socket) 433 netlink_kernel_release(dev->nls);
435 sock_release(dev->nls->sk_socket);
436 return -EINVAL; 434 return -EINVAL;
437 } 435 }
438 436
@@ -447,8 +445,7 @@ static void __devexit cn_fini(void)
447 445
448 cn_del_callback(&dev->id); 446 cn_del_callback(&dev->id);
449 cn_queue_free_dev(dev->cbdev); 447 cn_queue_free_dev(dev->cbdev);
450 if (dev->nls->sk_socket) 448 netlink_kernel_release(dev->nls);
451 sock_release(dev->nls->sk_socket);
452} 449}
453 450
454subsys_initcall(cn_init); 451subsys_initcall(cn_init);