[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 08 Aug 2023 15:28:57 +0200
From: Toke Høiland-Jørgensen <toke@...e.dk>
To: Wang Ming <machel@...o.com>, Kalle Valo <kvalo@...nel.org>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Wang Ming <machel@...o.com>
Subject: Re: [PATCH net-next v3] wifi: ath9k: Remove error checking for
debugfs_create_dir()
Wang Ming <machel@...o.com> writes:
> It is expected that most callers should _ignore_ the errors
> return by debugfs_create_dir() in ath9k_htc_init_debug().
>
> Signed-off-by: Wang Ming <machel@...o.com>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> index b3ed65e5c4da..85ad45771b44 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
> @@ -491,8 +491,6 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
>
> priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
> priv->hw->wiphy->debugfsdir);
> - if (!priv->debug.debugfs_phy)
> - return -ENOMEM;
Hmm, so it's true that all the debugfs_create* functions deal correctly
with the dir pointer being an error pointer, which means that it's
possible to just ignore the return value of debugfs_create_dir() without
anything breaking. However, it also seems kinda pointless to have all
those calls if we know they're going to fail, so I prefer v1 of this
patch that just fixed the IS_ERR check. No need to resend, we can just
apply v1 instead...
-Toke
Powered by blists - more mailing lists