Commit acdd1b8e authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Greg Kroah-Hartman

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: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d60fc1bb
...@@ -59,7 +59,7 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload) ...@@ -59,7 +59,7 @@ int libcfs_kkuc_msg_put(struct file *filp, void *payload)
mm_segment_t fs; mm_segment_t fs;
int rc = -ENXIO; int rc = -ENXIO;
if (!filp || IS_ERR(filp)) if (IS_ERR_OR_NULL(filp))
return -EBADF; return -EBADF;
if (kuch->kuc_magic != KUC_MAGIC) { if (kuch->kuc_magic != KUC_MAGIC) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment