aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-01-21 00:17:45 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-03 14:44:02 -0800
commit6ae07f1b38d18589fdeaa150b86252f02b2750fb (patch)
tree914096840b1a271eef4e85fde53d0cea0d44b203 /drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
parentStaging:lustre:obdclass:linux:remove unnecessary braces (diff)
downloadlinux-dev-6ae07f1b38d18589fdeaa150b86252f02b2750fb.tar.xz
linux-dev-6ae07f1b38d18589fdeaa150b86252f02b2750fb.zip
Staging:lustre:obdclass:linux:simplify NULL comparison
Remove explicit NULL comparision and replace it with a simpier form. Detected using checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass/linux/linux-module.c')
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index b0ee4db1e82b..1913f3e00ad5 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -239,7 +239,7 @@ static ssize_t health_show(struct kobject *kobj, struct attribute *attr,
struct obd_device *obd;
obd = class_num2obd(i);
- if (obd == NULL || !obd->obd_attached || !obd->obd_set_up)
+ if (!obd || !obd->obd_attached || !obd->obd_set_up)
continue;
LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
@@ -358,7 +358,7 @@ static int obd_device_list_seq_show(struct seq_file *p, void *v)
struct obd_device *obd = class_num2obd((int)index);
char *status;
- if (obd == NULL)
+ if (!obd)
return 0;
LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
@@ -422,7 +422,7 @@ int class_procfs_init(void)
struct dentry *file;
lustre_kobj = kobject_create_and_add("lustre", fs_kobj);
- if (lustre_kobj == NULL)
+ if (!lustre_kobj)
goto out;
/* Create the files associated with this kobject */