summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>2016-02-13 20:32:48 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-14 16:21:15 -0800
commitacdd1b8e681405beeb1f73333947fd5a42b871e9 (patch)
tree2b7fe36ba384af006880803d7f4089d7605e84ce
parentd60fc1bbc26a16e79258d9b11baea83f49ff7776 (diff)
staging: lustre: obdclass: Use IS_ERR_OR_NULL
Use macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The Coccinelle semantic patch used to make the change is as follows: //<smpl> @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/obdclass/kernelcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c
index be4867c5446c..8405eccdac19 100644
--- a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c
+++ b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c
@@ -59,7 +59,7 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload)
mm_segment_t fs;
int rc = -ENXIO;
- if (!filp || IS_ERR(filp))
+ if (IS_ERR_OR_NULL(filp))
return -EBADF;
if (kuch->kuc_magic != KUC_MAGIC) {