From patchwork Wed Aug 19 08:44:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 7036241 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 08DC29F373 for ; Wed, 19 Aug 2015 08:45:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 993F7206A0 for ; Wed, 19 Aug 2015 08:45:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D96E020650 for ; Wed, 19 Aug 2015 08:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbbHSIpX (ORCPT ); Wed, 19 Aug 2015 04:45:23 -0400 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:49180 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbbHSIpV (ORCPT ); Wed, 19 Aug 2015 04:45:21 -0400 Received: from kw-mxoi1.gw.nic.fujitsu.com (unknown [192.168.231.131]) by mgwkm03.jp.fujitsu.com with smtp id 732a_4976_86084c52_f7be_4fde_a346_451fb6494c7b; Wed, 19 Aug 2015 17:45:19 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by kw-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id 3E2E9AC0377 for ; Wed, 19 Aug 2015 17:45:19 +0900 (JST) Received: from WIN-5MHF4RKU941.jp.fujitsu.com (unknown [10.124.102.163]) by m3051.s.css.fujitsu.com (Postfix) with SMTP id 0F993DC for ; Wed, 19 Aug 2015 17:45:19 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 3e89de391a71451dbbb0af551425de82 Message-Id: <201508190844.AA00004@WIN-5MHF4RKU941.jp.fujitsu.com> From: Tsutomu Itoh Date: Wed, 19 Aug 2015 17:44:53 +0900 To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: cleanup: remove unnecessary check before btrfs_free_path is called MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We need not check path before btrfs_free_path() is called because path is checked in btrfs_free_path(). Signed-off-by: Tsutomu Itoh --- 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)