Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp334594imm; Thu, 13 Sep 2018 22:17:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZSwR+BJyeeM9Rwl0UD5u8WhAzYDuXRJ3J9P5ohsyFfjTbwXJsI7jHbbvY/Vn/M2MTh1ihX X-Received: by 2002:a62:20d8:: with SMTP id m85-v6mr10501841pfj.74.1536902240336; Thu, 13 Sep 2018 22:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536902240; cv=none; d=google.com; s=arc-20160816; b=bmQgLILYeL9UmKKYQotCjwrT4FsPMrqKXQGJzGYF9L7m8Pqg9bLDunuqGQvXaxfw5c C0K4vEX8+xeVm2pCtRT1AQocgGtZAPDSz7T9HjP3ttkOfAyHi2toQ3taXQAA1bNfOOIj pBOMFK5f39+EAGrsr8atrfCrv/W2CZq3vJs+fHC9W9HofDHYurldoRkRoZD78Nu/fzG9 CuBkDezXboiZXmmFlozySHBwzbHQRBClsQq2OU6kLCxLoDConBQ6Ny/4/rQbOcCsmrwA hT0BxGKan8SLhjtINTKqSdRR6aeIrcWefB0T7OREhLsn0XC/zWKIoii4tBN/U+QQydUY r0Jg== 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=3BpR7iPUteNb7vP+OkziVeh/90vYU0Wvo9IM2W8eWIM=; b=BQDMOUO4ISVk5JaQTWX+XZlqIFP9lF8ACUInGP75cGBdW5DCcszTaVqobJwvuOByXJ P77BjQADhe6RtUaa1urQP8yK3YmLR3BrMSmvGBvH9aWg7U5Jvxzk6No8rNwGxsORB+or NQkTyyDJ2GDJjSY/50tobrKkCL0PnySzuSH1RPA2oTSPlVL6Tae8ROcgV9xCDNNMmQfu hPva4WUpR7wf5TQnLRsWf2TwjKMv8pTiagFJkyDIEuWUwOQlngS1tnEkYFdM4kogGEqC Pc704iP496fAyvckYKl4jNrhWES6Kph80idrhF8u+bTB53pwXzPXsTMmwhmScumI6b5A hxfQ== 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 t1-v6si5922673pfb.208.2018.09.13.22.17.04; Thu, 13 Sep 2018 22:17:20 -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 S1727598AbeINK3p (ORCPT + 99 others); Fri, 14 Sep 2018 06:29:45 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51344 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726890AbeINK3o (ORCPT ); Fri, 14 Sep 2018 06:29:44 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8D26DC2E1F527; Fri, 14 Sep 2018 13:16:54 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.399.0; Fri, 14 Sep 2018 13:16:53 +0800 From: zhong jiang To: , , , CC: , , Subject: [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove Date: Fri, 14 Sep 2018 13:04:37 +0800 Message-ID: <1536901477-28375-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 has taken the IS_ERR into account. Just remove the unnecessary condition. Signed-off-by: zhong jiang --- drivers/net/ieee802154/ca8210.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index 58299fb..46b4818 100644 --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -3044,8 +3044,7 @@ static void ca8210_test_interface_clear(struct ca8210_priv *priv) { struct ca8210_test *test = &priv->test; - if (!IS_ERR(test->ca8210_dfs_spi_int)) - debugfs_remove(test->ca8210_dfs_spi_int); + debugfs_remove(test->ca8210_dfs_spi_int); kfifo_free(&test->up_fifo); dev_info(&priv->spi->dev, "Test interface removed\n"); } -- 1.7.12.4