Commit 6ae07f1b authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Greg Kroah-Hartman

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 197cb405
...@@ -239,7 +239,7 @@ static ssize_t health_show(struct kobject *kobj, struct attribute *attr, ...@@ -239,7 +239,7 @@ static ssize_t health_show(struct kobject *kobj, struct attribute *attr,
struct obd_device *obd; struct obd_device *obd;
obd = class_num2obd(i); obd = class_num2obd(i);
if (obd == NULL || !obd->obd_attached || !obd->obd_set_up) if (!obd || !obd->obd_attached || !obd->obd_set_up)
continue; continue;
LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
...@@ -358,7 +358,7 @@ static int obd_device_list_seq_show(struct seq_file *p, void *v) ...@@ -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); struct obd_device *obd = class_num2obd((int)index);
char *status; char *status;
if (obd == NULL) if (!obd)
return 0; return 0;
LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC); LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
...@@ -422,7 +422,7 @@ int class_procfs_init(void) ...@@ -422,7 +422,7 @@ int class_procfs_init(void)
struct dentry *file; struct dentry *file;
lustre_kobj = kobject_create_and_add("lustre", fs_kobj); lustre_kobj = kobject_create_and_add("lustre", fs_kobj);
if (lustre_kobj == NULL) if (!lustre_kobj)
goto out; goto out;
/* Create the files associated with this kobject */ /* Create the files associated with this kobject */
......
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