Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2156164imm; Thu, 27 Sep 2018 08:16:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV618PzBL+f7JK4wvXl+nZq7SJdQzWFdvEpR8+zMlR4YRwuJrvLC+vZdX0KHWsuGJIiHdBjlJ X-Received: by 2002:a63:f414:: with SMTP id g20-v6mr10720573pgi.407.1538061379004; Thu, 27 Sep 2018 08:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538061378; cv=none; d=google.com; s=arc-20160816; b=wZ/pTCHDIPQlVGMClWEyEgtUerem+d/l6fMWJG1NojCZifE11EVRm/UwZHzdmjRxCV VuXMlqCn7Mnlh3Naa0cq4Zf3W76d9DTps0G9+EClKaAkcM9U8vXoOqzopwv19kj++uPG 2kb67obcgiObnc45Ceu0DS/4HX0TtzfwKzo5QoUvwy2illim3ltMQYsuV+BEUcZf4UdL WHnJ3leUhYl22AZ+M7OUc/Y2wURUh4K66EKz8Lpan1kfgnxgAS5ncwtb7jb0YePMMQAi uYRl5fhvISxE41c8nroVJ/tG36+IKTM7Dj1p4joUF+z7JteXwwUQUngWTw7ZuVhbkviK Z1ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=PJwkZ+6DHxouQHH8ZdN6oC/eOyZibTluR3YTIiK/+t0=; b=oje0qOhps0vdIoM/LJ7eIWCOgWcLxUK3+61mQDWPu9DmkLyemOaZTddsj8yHzphrV8 5M6weX9oXuMw3B3MxxXUfEjhfyonM2Y7bUTPPc+FD+roha3ztIMonqUTBQt/IEHbIeAf zfy4Wtk0ZyTH0tzfqv7zK4CcPQiK+s+SKx95HAlsLI1pkpj8SzBZ5AVnJW4KQ4brY1JH PFpIctmWeb4mees6LxyqGK0bJgHJ0snYLe0uRni7IyCe6m57NfDy5klwfo4xImpY1Y5c paAzZ7KyS9CvjvGduPnrbU+57R7mu60tfdoMcvZzvDjjbFzgfV2YDCTziLz8ZByB8qhn oaPw== 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 w9-v6si2331418pfg.234.2018.09.27.08.16.00; Thu, 27 Sep 2018 08:16:18 -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 S1728161AbeI0Veb (ORCPT + 99 others); Thu, 27 Sep 2018 17:34:31 -0400 Received: from proxima.lasnet.de ([78.47.171.185]:50461 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727280AbeI0Vea (ORCPT ); Thu, 27 Sep 2018 17:34:30 -0400 Received: from localhost.localdomain (p200300E9D7234A78891558B353DFC2C9.dip0.t-ipconnect.de [IPv6:2003:e9:d723:4a78:8915:58b3:53df:c2c9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id 23C90C87C0; Thu, 27 Sep 2018 17:15:45 +0200 (CEST) Subject: Re: [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove To: zhong jiang , h.morris@cascoda.com, alex.aring@gmail.com, davem@davemloft.net Cc: linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1536901477-28375-1-git-send-email-zhongjiang@huawei.com> From: Stefan Schmidt Message-ID: <1501d440-c509-862e-c945-94665ec75c83@datenfreihafen.org> Date: Thu, 27 Sep 2018 17:15:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1536901477-28375-1-git-send-email-zhongjiang@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Zhong. On 14/09/2018 07:04, zhong jiang wrote: > 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"); > } > This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks! regards Stefan Schmidt