public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: lustre: llite: llite_lib.c:  Removes unnecessary NULL check
@ 2014-12-21 22:08 Rickard Strandqvist
  2014-12-21 23:30 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Rickard Strandqvist @ 2014-12-21 22:08 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger
  Cc: Rickard Strandqvist, Greg Kroah-Hartman, Lai Siyao, Peng Tao,
	Julia Lawall, Greg Donald, Al Viro, John L. Hammond,
	Brian Behlendorf, HPDD-discuss, devel, linux-kernel

Removes same unnecessary NULL check.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-21 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-21 22:08 [PATCH] staging: lustre: lustre: llite: llite_lib.c: Removes unnecessary NULL check Rickard Strandqvist
2014-12-21 23:30 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox