mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH linux-next] hugetlbfs: hugetlbfs_fill_super(): remove kfree() redundant null check
@ 2013-02-12 18:17 Tim Gardner
  2013-02-12 19:44 ` nyc
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Gardner @ 2013-02-12 18:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tim Gardner, Nadia Yvette Chambers

smatch analysis:

fs/hugetlbfs/inode.c:883 hugetlbfs_fill_super() info: redundant null check on sbinfo->spool calling kfree()

Cc: Nadia Yvette Chambers <nyc@holomorphy.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 fs/hugetlbfs/inode.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 78bde32..e2e36ef 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -879,8 +879,7 @@ hugetlbfs_fill_super(struct super_block *sb, void *data, int silent)
 		goto out_free;
 	return 0;
 out_free:
-	if (sbinfo->spool)
-		kfree(sbinfo->spool);
+	kfree(sbinfo->spool);
 	kfree(sbinfo);
 	return -ENOMEM;
 }
-- 
1.7.9.5


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

end of thread, other threads:[~2013-02-12 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-12 18:17 [PATCH linux-next] hugetlbfs: hugetlbfs_fill_super(): remove kfree() redundant null check Tim Gardner
2013-02-12 19:44 ` nyc

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

all inboxes | Powered by JetHome®