All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: cleanup: remove unnecessary check before btrfs_free_path is called
Date: Wed, 19 Aug 2015 17:44:53 +0900	[thread overview]
Message-ID: <201508190844.AA00004@WIN-5MHF4RKU941.jp.fujitsu.com> (raw)

We need not check path before btrfs_free_path() is called because
path is checked in btrfs_free_path().

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
 cmds-check.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmds-check.c b/cmds-check.c
index 4fa8709..8019fb0 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -9226,8 +9226,7 @@ next:
 	ret = 0;
 out:
 	free_roots_info_cache();
-	if (path)
-		btrfs_free_path(path);
+	btrfs_free_path(path);
 	if (trans)
 		btrfs_commit_transaction(trans, info->tree_root);
 	if (ret < 0)
-- 
2.4.5


             reply	other threads:[~2015-08-19  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  8:44 Tsutomu Itoh [this message]
2015-08-25 15:34 ` [PATCH] btrfs-progs: cleanup: remove unnecessary check before btrfs_free_path is called David Sterba

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=201508190844.AA00004@WIN-5MHF4RKU941.jp.fujitsu.com \
    --to=t-itoh@jp.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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 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.