diff mbox

btrfs-progs: cleanup: remove unnecessary check before btrfs_free_path is called

Message ID 201508190844.AA00004@WIN-5MHF4RKU941.jp.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Tsutomu Itoh Aug. 19, 2015, 8:44 a.m. UTC
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(-)

Comments

David Sterba Aug. 25, 2015, 3:34 p.m. UTC | #1
On Wed, Aug 19, 2015 at 05:44:53PM +0900, Tsutomu Itoh wrote:
> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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)