aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinjie Du <[email protected]>2023-07-12 19:47:40 +0800
committerKalle Valo <[email protected]>2023-08-22 16:36:08 +0300
commit6edb4ba6fb5b946d112259f54f4657f82eb71e89 (patch)
tree35ffa983a47ed3a53057693b51d45383443391a8
parent454994cfa9e4c18b6df9f78b60db8eadc20a6c25 (diff)
wifi: ath9k: fix parameter check in ath9k_init_debug()
Make IS_ERR() judge the debugfs_create_dir() function return in ath9k_init_debug() Signed-off-by: Minjie Du <[email protected]> Acked-by: Toke Høiland-Jørgensen <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index fb7a2952d0ce..995c6e705637 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1420,7 +1420,7 @@ int ath9k_init_debug(struct ath_hw *ah)
sc->debug.debugfs_phy = debugfs_create_dir("ath9k",
sc->hw->wiphy->debugfsdir);
- if (!sc->debug.debugfs_phy)
+ if (IS_ERR(sc->debug.debugfs_phy))
return -ENOMEM;
#ifdef CONFIG_ATH_DEBUG