diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index e88bee3624973277cc531f140e3665a99bc308ff..250c618687041890685fee63a2fdde8ed3399a6d 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -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();