[PATCH] staging: lustre: lustre: llite: llite_lib.c: Removes unnecessary NULL check

From: Rickard Strandqvist
Date: Sun Dec 21 2014 - 17:05:33 EST


Removes same unnecessary NULL check.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/lustre/lustre/llite/llite_lib.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 7b6b9e2..435e1ad 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -591,10 +591,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
get_uuid2fsid(uuid->uuid, strlen(uuid->uuid), &sbi->ll_fsid);
}

- if (data != NULL)
- OBD_FREE_PTR(data);
- if (osfs != NULL)
- OBD_FREE_PTR(osfs);
+ OBD_FREE_PTR(data);
+ OBD_FREE_PTR(osfs);

return err;
out_root:
@@ -612,10 +610,8 @@ out_md:
obd_disconnect(sbi->ll_md_exp);
sbi->ll_md_exp = NULL;
out:
- if (data != NULL)
- OBD_FREE_PTR(data);
- if (osfs != NULL)
- OBD_FREE_PTR(osfs);
+ OBD_FREE_PTR(data);
+ OBD_FREE_PTR(osfs);
lprocfs_unregister_mountpoint(sbi);
return err;
}
--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/