@@ -2693,7 +2693,9 @@ static int kiblnd_base_startup(struct net *ns)
LASSERT(kiblnd_data.kib_init == IBLND_INIT_NOTHING);
- try_module_get(THIS_MODULE);
+ if (!try_module_get(THIS_MODULE))
+ goto failed;
+
/* zero pointers, flags etc */
memset(&kiblnd_data, 0, sizeof(kiblnd_data));
@@ -2357,7 +2357,8 @@ static int ksocknal_push(struct lnet_ni *ni, struct lnet_process_id id)
/* flag lists/ptrs/locks initialised */
ksocknal_data.ksnd_init = SOCKNAL_INIT_DATA;
- try_module_get(THIS_MODULE);
+ if (!try_module_get(THIS_MODULE))
+ goto failed;
/* Create a scheduler block per available CPT */
ksocknal_data.ksnd_schedulers = cfs_percpt_alloc(lnet_cpt_table(),