aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/core/device.c')
-rw-r--r--drivers/infiniband/core/device.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 46a7a3febc12..4007f721d25d 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -38,6 +38,7 @@
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/mutex.h> 40#include <linux/mutex.h>
41#include <rdma/rdma_netlink.h>
41 42
42#include "core_priv.h" 43#include "core_priv.h"
43 44
@@ -730,14 +731,23 @@ static int __init ib_core_init(void)
730 goto err; 731 goto err;
731 } 732 }
732 733
734 ret = ibnl_init();
735 if (ret) {
736 printk(KERN_WARNING "Couldn't init IB netlink interface\n");
737 goto err_sysfs;
738 }
739
733 ret = ib_cache_setup(); 740 ret = ib_cache_setup();
734 if (ret) { 741 if (ret) {
735 printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n"); 742 printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
736 goto err_sysfs; 743 goto err_nl;
737 } 744 }
738 745
739 return 0; 746 return 0;
740 747
748err_nl:
749 ibnl_cleanup();
750
741err_sysfs: 751err_sysfs:
742 ib_sysfs_cleanup(); 752 ib_sysfs_cleanup();
743 753
@@ -749,6 +759,7 @@ err:
749static void __exit ib_core_cleanup(void) 759static void __exit ib_core_cleanup(void)
750{ 760{
751 ib_cache_cleanup(); 761 ib_cache_cleanup();
762 ibnl_cleanup();
752 ib_sysfs_cleanup(); 763 ib_sysfs_cleanup();
753 /* Make sure that any pending umem accounting work is done. */ 764 /* Make sure that any pending umem accounting work is done. */
754 destroy_workqueue(ib_wq); 765 destroy_workqueue(ib_wq);