Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp666446imm; Sat, 8 Sep 2018 06:42:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZLMgNN1Q4VWHSj9uh2NxBxdY0qQrAvc9KoHbjSZ+MFHIlL79QpZA0Y91kqm/N4QM4BwGI2 X-Received: by 2002:a63:1823:: with SMTP id y35-v6mr13434675pgl.438.1536414176663; Sat, 08 Sep 2018 06:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536414176; cv=none; d=google.com; s=arc-20160816; b=dGWEFngQHjsnZDP6d40cqq5eJi8ouA69MaOh6m2xZ3XMvT7aMfIRjmWT+xD/Q5LEmo LSzw+anJIQnp8Io6hWs7cY/OZcq93nijjQS08025cIW/3OClPmMZ3hqwI8n48YhkyKFM JVjWf/GbCrej/2HM0FHtdaSs6llwaKQT1+biHC0VyKzla/ibDI4fU0W8D2CDhWL6Jcex Gknu56AuEij46ZWSR7y1l5hDyrCVJy7i3gtBWEgta2hd7Uen9vL4+zDxenDLPEwkvEdR ejmkmLuEzUOsZLujFNYuQ08Ot0MVMkVtgAPX6QRnDtsxk8akZ0TbfWM6F7edJNDx9okS E9jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Tu4/GWq6WPEGPAxO779A3rQjiOfJpVqxKHvAAYF2vuA=; b=yKdo4gW09Cw+sKJjdHmPBPDANnHg6Rl+PIzeq8F9sf57Bap5NajNg8AA25IpSF1p7p /GQJbioJuue3CLrwHDEygPNKrcOqDEu19z+c4UlNkKAIQsPQbmTdQUv9HHYyVjMrs/f3 DXJ4mOC8kqNjPAKtzgGRSx+0+CLiKggTMdfycF+nRaGIN+6wM0UN04/KXp8LCPV4pgAI /S6SY9Nt1sdLjlpXu4xsZ7wTSGszonLDxqmAChKFfoRpCfCH8syTNY1Wyd1gX6VobWJI 0R7RjlanBuLF93LtORDT3+XabB19jSXAu+0eouzdob4YQPyfYpe0DMh+VEXz8miIM924 2wqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20-v6si12030163pgl.249.2018.09.08.06.42.41; Sat, 08 Sep 2018 06:42:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbeIHS1Q (ORCPT + 99 others); Sat, 8 Sep 2018 14:27:16 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:40508 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726452AbeIHS1Q (ORCPT ); Sat, 8 Sep 2018 14:27:16 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 3830C10C8E842; Sat, 8 Sep 2018 21:41:22 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Sat, 8 Sep 2018 21:41:22 +0800 From: zhong jiang To: , CC: , Subject: [PATCH] bcache: remove unecessary condition check before debugfs_remove_recursive Date: Sat, 8 Sep 2018 21:29:10 +0800 Message-ID: <1536413350-31523-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org debugfs_remove_recursive has taken IS_ERR_OR_NULL into account. So just remove the condition check before debugfs_remove_recursive. Signed-off-by: zhong jiang --- drivers/md/bcache/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/bcache/debug.c b/drivers/md/bcache/debug.c index 06da66b..8c53d87 100644 --- a/drivers/md/bcache/debug.c +++ b/drivers/md/bcache/debug.c @@ -249,8 +249,7 @@ void bch_debug_init_cache_set(struct cache_set *c) void bch_debug_exit(void) { - if (!IS_ERR_OR_NULL(bcache_debug)) - debugfs_remove_recursive(bcache_debug); + debugfs_remove_recursive(bcache_debug); } void __init bch_debug_init(struct kobject *kobj) -- 1.7.12.4