Browse Source

staging: lustre: obdclass: Fix comparison to NULL

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>
Dafna Hirschfeld 7 years ago
parent
commit
e4dea99bfa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

+ 1 - 1
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c

@@ -1585,7 +1585,7 @@ int ldebugfs_seq_create(struct dentry *parent, const char *name,
 	struct dentry *entry;
 	struct dentry *entry;
 
 
 	/* Disallow secretly (un)writable entries. */
 	/* 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);
 	entry = debugfs_create_file(name, mode, parent, data, seq_fops);
 	if (IS_ERR_OR_NULL(entry))
 	if (IS_ERR_OR_NULL(entry))