All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree
@ 2015-06-23  5:58 ` Maninder Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Maninder Singh @ 2015-06-23  5:58 UTC (permalink / raw)
  To: clm, jbacik, dsterba, linux-btrfs, linux-kernel; +Cc: pankaj.m, Maninder Singh

There is no need of NULL check before kfree,
removing the same

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
---
 fs/btrfs/free-space-cache.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 9dbe5b5..88f1e16 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2101,8 +2101,7 @@ new_bitmap:
 
 out:
 	if (info) {
-		if (info->bitmap)
-			kfree(info->bitmap);
+		kfree(info->bitmap);
 		kmem_cache_free(btrfs_free_space_cachep, info);
 	}
 
@@ -3561,8 +3560,7 @@ again:
 
 	if (info)
 		kmem_cache_free(btrfs_free_space_cachep, info);
-	if (map)
-		kfree(map);
+	kfree(map);
 	return 0;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in

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

* [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree
@ 2015-06-23  5:58 ` Maninder Singh
  0 siblings, 0 replies; 3+ messages in thread
From: Maninder Singh @ 2015-06-23  5:58 UTC (permalink / raw)
  To: clm, jbacik, dsterba, linux-btrfs, linux-kernel; +Cc: pankaj.m, Maninder Singh

There is no need of NULL check before kfree,
removing the same

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>
---
 fs/btrfs/free-space-cache.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 9dbe5b5..88f1e16 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2101,8 +2101,7 @@ new_bitmap:
 
 out:
 	if (info) {
-		if (info->bitmap)
-			kfree(info->bitmap);
+		kfree(info->bitmap);
 		kmem_cache_free(btrfs_free_space_cachep, info);
 	}
 
@@ -3561,8 +3560,7 @@ again:
 
 	if (info)
 		kmem_cache_free(btrfs_free_space_cachep, info);
-	if (map)
-		kfree(map);
+	kfree(map);
 	return 0;
 }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree
  2015-06-23  5:58 ` Maninder Singh
  (?)
@ 2015-06-23 12:00 ` David Sterba
  -1 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2015-06-23 12:00 UTC (permalink / raw)
  To: Maninder Singh; +Cc: clm, jbacik, linux-btrfs, linux-kernel, pankaj.m

On Tue, Jun 23, 2015 at 11:28:00AM +0530, Maninder Singh wrote:
> There is no need of NULL check before kfree,
> removing the same
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com>

Reviewed-by: David Sterba <dsterba@suse.cz>

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23  5:58 [PATCH 1/1] Btrfs: Remove redundant NULL check before kfree Maninder Singh
2015-06-23  5:58 ` Maninder Singh
2015-06-23 12:00 ` David Sterba

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.