mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Gardner <tim.gardner@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: Tim Gardner <tim.gardner@canonical.com>,
	Nadia Yvette Chambers <nyc@holomorphy.com>
Subject: [PATCH linux-next] hugetlbfs: hugetlbfs_fill_super(): remove kfree() redundant null check
Date: Tue, 12 Feb 2013 11:17:51 -0700	[thread overview]
Message-ID: <1360693071-61227-1-git-send-email-tim.gardner@canonical.com> (raw)

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


             reply	other threads:[~2013-02-12 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 18:17 Tim Gardner [this message]
2013-02-12 19:44 ` nyc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360693071-61227-1-git-send-email-tim.gardner@canonical.com \
    --to=tim.gardner@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nyc@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®