Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5534510imm; Wed, 12 Sep 2018 07:24:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYrJpmxp2M64vtcRQtDri1jBnqfBWKkTlHhqrpzYy3ymY4HRDKGexS/0RA6K5vAEgQtgQ4z X-Received: by 2002:a63:6c89:: with SMTP id h131-v6mr2598925pgc.237.1536762272974; Wed, 12 Sep 2018 07:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536762272; cv=none; d=google.com; s=arc-20160816; b=Ced6J85y7tBM/Omant4BKupGIbo7sDN8WuE2M8YcFd9rlVSqdDHrFcm4hGPy58x1fp umGLLqK/Z8fh4QY204HC6rNnyfniID2buwIfqvw6tSfPkbSPOTo5Lw46psSVc3rx9wVq l3/M10/2voijh4Z6nMv9YFYP/rih2gBRqH2ZYv50l5RV4C6dVIxEm0X8rP8cLQ8LY6D0 D1J9q9PoPgNk3qnTQL2joVGDeZsry0IrxRqaoNMNIJPxxPgAzcRmKvIW4FaykHYrMPTX fC8bc1j1l77Xi1fIKSt5oDu3PBl3eDwRS8KWQVEZt3K/xCQiKnlPCiDGecc9OYmOLXwP i9Hg== 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=+W+R/rI2XTykIX68IadOoTUxBeXepN4+maLY7vPzD0k=; b=tPM1mouTaxg5VEc/08u3tlLEodkeILqQSCaXQBqKj5lG5OnA1XbWylapVmGBvaEnHG 5UepXaZTTcsS0YU/ikL9BZ8wg9cZffO0hBLjixh4TKYxWNIMjK5JeR9wIBBccSGmJ0Se WxWpROQGfwo/80OHPr2ErKcl8UM+o2Q/6oxvUjHOkNK7JHf8i4tFX+Qh+gDcbfGtME6U zcgimgAnBXIZnxjomaew7gwu4oZuIpyY1XwS6LvrsI6dHvIdB0KaNQ8iXcO8zJKi3RkF bsBxObHwb6DpoMCGJp7v5x+zJBSGCq6q/oydW2PFLqJfvt3I9nUeGsTIPboERaKWiXXa QZoQ== 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 e9-v6si1364214pgj.70.2018.09.12.07.24.11; Wed, 12 Sep 2018 07:24:32 -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 S1727626AbeILT1P (ORCPT + 99 others); Wed, 12 Sep 2018 15:27:15 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11693 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726537AbeILT1P (ORCPT ); Wed, 12 Sep 2018 15:27:15 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7ED8AE91F9DB0; Wed, 12 Sep 2018 22:22:27 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Wed, 12 Sep 2018 22:22:26 +0800 From: zhong jiang To: , CC: , , , , , , Subject: [PATCH] brcm80211: remove redundant condition check before debugfs_remove_recursive Date: Wed, 12 Sep 2018 22:10:12 +0800 Message-ID: <1536761412-24932-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/net/wireless/broadcom/brcm80211/brcmsmac/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c index 2fe1f68..3bd54f1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/debug.c @@ -62,8 +62,7 @@ int brcms_debugfs_attach(struct brcms_pub *drvr) void brcms_debugfs_detach(struct brcms_pub *drvr) { - if (!IS_ERR_OR_NULL(drvr->dbgfs_dir)) - debugfs_remove_recursive(drvr->dbgfs_dir); + debugfs_remove_recursive(drvr->dbgfs_dir); } struct dentry *brcms_debugfs_get_devdir(struct brcms_pub *drvr) -- 1.7.12.4