From: James Simmons Date: Mon, 7 Mar 2016 23:10:22 +0000 (-0500) Subject: staging: lustre: change test to assert in LNetGetId X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=31b36ec65007f18c485ede7920ec3e1ea9614414;p=linux-beck.git staging: lustre: change test to assert in LNetGetId The ln_refcount test was changed into an assert. Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index a666d49016f4..6c7579e42b88 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -2090,9 +2090,7 @@ LNetGetId(unsigned int index, lnet_process_id_t *id) int cpt; int rc = -ENOENT; - /* LNetNI initilization failed? */ - if (!the_lnet.ln_refcount) - return rc; + LASSERT(the_lnet.ln_refcount > 0); cpt = lnet_net_lock_current();