All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] dlm: Remove NULL check before kfree
@ 2015-06-23 11:50 ` Maninder Singh
  0 siblings, 0 replies; 2+ messages in thread
From: Maninder Singh @ 2015-06-23 11:50 UTC (permalink / raw)
  To: ccaulfie, teigland, cluster-devel, linux-kernel; +Cc: pankaj.m, Maninder Singh

No need of NULL check before kfree,
removing the same.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 fs/dlm/lockspace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..41c53b3 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -673,10 +673,8 @@ static int new_lockspace(const char *name, const char *cluster,
 	kfree(ls->ls_recover_buf);
  out_lkbidr:
 	idr_destroy(&ls->ls_lkbidr);
-	for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
-		if (ls->ls_remove_names[i])
-			kfree(ls->ls_remove_names[i]);
-	}
+	for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++)
+		kfree(ls->ls_remove_names[i]);
  out_rsbtbl:
 	vfree(ls->ls_rsbtbl);
  out_lsfree:
-- 
1.7.9.5


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

* [Cluster-devel] [PATCH 1/1] dlm: Remove NULL check before kfree
@ 2015-06-23 11:50 ` Maninder Singh
  0 siblings, 0 replies; 2+ messages in thread
From: Maninder Singh @ 2015-06-23 11:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

No need of NULL check before kfree,
removing the same.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 fs/dlm/lockspace.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index f3e7278..41c53b3 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -673,10 +673,8 @@ static int new_lockspace(const char *name, const char *cluster,
 	kfree(ls->ls_recover_buf);
  out_lkbidr:
 	idr_destroy(&ls->ls_lkbidr);
-	for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
-		if (ls->ls_remove_names[i])
-			kfree(ls->ls_remove_names[i]);
-	}
+	for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++)
+		kfree(ls->ls_remove_names[i]);
  out_rsbtbl:
 	vfree(ls->ls_rsbtbl);
  out_lsfree:
-- 
1.7.9.5



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

end of thread, other threads:[~2015-06-23 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 11:50 [PATCH 1/1] dlm: Remove NULL check before kfree Maninder Singh
2015-06-23 11:50 ` [Cluster-devel] " Maninder Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.