From: Wang Ming <machel@vivo.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Kalle Valo" <kvalo@kernel.org>,
"Rajkumar Manoharan" <rmanoharan@atheros.com>,
"John W. Linville" <linville@tuxdriver.com>,
"Sujith Manoharan" <Sujith.Manoharan@atheros.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Wang Ming <machel@vivo.com>
Subject: [PATCH net v1] net:wireless:Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
Date: Thu, 13 Jul 2023 11:03:44 +0800 [thread overview]
Message-ID: <20230713030358.12379-1-machel@vivo.com> (raw)
The debugfs_create_dir() function returns error pointers,
it never returns NULL. Most incorrect error checks were fixed,
but the one in ath9k_htc_init_debug() was forgotten.
Fix the remaining error check.
Signed-off-by: Wang Ming <machel@vivo.com>
Fixes: e5facc75fa91 ("ath9k_htc: Cleanup HTC debugfs")
---
drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
index b3ed65e5c4da..c55aab01fff5 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -491,7 +491,7 @@ 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)
+ if (IS_ERR(priv->debug.debugfs_phy))
return -ENOMEM;
ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
--
2.25.1
next reply other threads:[~2023-07-13 3:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 3:03 Wang Ming [this message]
2023-07-13 15:58 ` Jeff Johnson
2023-08-08 13:29 ` Toke Høiland-Jørgensen
2023-08-25 7:35 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230713030358.12379-1-machel@vivo.com \
--to=machel@vivo.com \
--cc=Sujith.Manoharan@atheros.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=opensource.kernel@vivo.com \
--cc=rmanoharan@atheros.com \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®