aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet/lnet/api-ni.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/api-ni.c')
-rw-r--r--drivers/staging/lustre/lnet/lnet/api-ni.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index e88bee362497..160a4292c6ce 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -1371,7 +1371,7 @@ EXPORT_SYMBOL(LNetNIInit);
* \return always 0 for current implementation.
*/
int
-LNetNIFini()
+LNetNIFini(void)
{
LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
@@ -1541,7 +1541,10 @@ LNetGetId(unsigned int index, lnet_process_id_t *id)
int rc = -ENOENT;
LASSERT(the_lnet.ln_init);
- LASSERT(the_lnet.ln_refcount > 0);
+
+ /* LNetNI initilization failed? */
+ if (the_lnet.ln_refcount == 0)
+ return rc;
cpt = lnet_net_lock_current();