Linux-WPAN Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove
@ 2018-09-14  5:04 zhong jiang
  2018-09-27 15:15 ` Stefan Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: zhong jiang @ 2018-09-14  5:04 UTC (permalink / raw)
  To: stefan, h.morris, alex.aring, davem; +Cc: linux-wpan, netdev, linux-kernel

debugfs_remove has taken the IS_ERR into account. Just
remove the unnecessary condition.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove
  2018-09-14  5:04 [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove zhong jiang
@ 2018-09-27 15:15 ` Stefan Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Schmidt @ 2018-09-27 15:15 UTC (permalink / raw)
  To: zhong jiang, h.morris, alex.aring, davem; +Cc: linux-wpan, netdev, linux-kernel

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 <zhongjiang@huawei.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14  5:04 [PATCH] ieee802154: ca8210: remove redundant condition check before debugfs_remove zhong jiang
2018-09-27 15:15 ` Stefan Schmidt

Linux-WPAN Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wpan/0 linux-wpan/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wpan linux-wpan/ https://lore.kernel.org/linux-wpan \
		linux-wpan@vger.kernel.org
	public-inbox-index linux-wpan

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wpan


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git