]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: change test to assert in LNetGetId
authorJames Simmons <jsimmons@infradead.org>
Mon, 7 Mar 2016 23:10:22 +0000 (18:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2016 00:17:45 +0000 (16:17 -0800)
The ln_refcount test was changed into an assert.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/api-ni.c

index a666d49016f4f69e9f1a6ac2d22973e4abc6c638..6c7579e42b88fbc83e48810cc979d554b4dc702c 100644 (file)
@@ -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();