]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: libcfs: remove explicit test of NULL variable
authorJames Simmons <jsimmons@infradead.org>
Thu, 17 Nov 2016 19:35:42 +0000 (14:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 07:47:31 +0000 (08:47 +0100)
Remove != NULL which is not needed to test key existence.

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

index 83543f928279823d5db029956e05f031edd8f063..1deea765758fbd7707be2f1ae52eccaf0cde91de 100644 (file)
@@ -73,7 +73,7 @@ cfs_percpt_lock_create(struct cfs_cpt_table *cptab,
 
        cfs_percpt_for_each(lock, i, pcl->pcl_locks) {
                spin_lock_init(lock);
-               if (keys != NULL)
+               if (keys)
                        lockdep_set_class(lock, &keys[i]);
        }