]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: lustre: obdclass: Fix comparison to NULL
authorDafna Hirschfeld <dafna3@gmail.com>
Sun, 4 Mar 2018 20:09:32 +0000 (22:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Mar 2018 12:01:11 +0000 (04:01 -0800)
Replace comparison to NULL with a 'not' operator.
Issue found with checkpatch.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

index e1f4ef2bddd4bccfd58c8c298b4aed966325e25e..64cc746396eaa2ae4d0c0580edca4faba6e8df91 100644 (file)
@@ -1585,7 +1585,7 @@ int ldebugfs_seq_create(struct dentry *parent, const char *name,
        struct dentry *entry;
 
        /* Disallow secretly (un)writable entries. */
-       LASSERT((seq_fops->write == NULL) == ((mode & 0222) == 0));
+       LASSERT((!seq_fops->write) == ((mode & 0222) == 0));
 
        entry = debugfs_create_file(name, mode, parent, data, seq_fops);
        if (IS_ERR_OR_NULL(entry))