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 83543f9..1deea76 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]);
        }