diff mbox series

ieee802154: ca8210: remove redundant condition check before debugfs_remove

Message ID 1536901477-28375-1-git-send-email-zhongjiang@huawei.com (mailing list archive)
State Accepted
Headers show
Series ieee802154: ca8210: remove redundant condition check before debugfs_remove | expand

Commit Message

zhong jiang Sept. 14, 2018, 5:04 a.m. UTC
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(-)

Comments

Stefan Schmidt Sept. 27, 2018, 3:15 p.m. UTC | #1
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
diff mbox series

Patch

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");
 }