diff mbox series

[v1] net: wireless: ath9k: fix parameter check in ath9k_init_debug()

Message ID 20230712114740.13226-1-duminjie@vivo.com
State New
Headers show
Series [v1] net: wireless: ath9k: fix parameter check in ath9k_init_debug() | expand

Commit Message

Minjie Du July 12, 2023, 11:47 a.m. UTC
Make IS_ERR() judge the debugfs_create_dir() function return
in ath9k_init_debug()

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/net/wireless/ath/ath9k/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Toke Høiland-Jørgensen Aug. 8, 2023, 1:30 p.m. UTC | #1
Minjie Du <duminjie@vivo.com> writes:

> Make IS_ERR() judge the debugfs_create_dir() function return
> in ath9k_init_debug()
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Kalle Valo Aug. 22, 2023, 1:36 p.m. UTC | #2
Minjie Du <duminjie@vivo.com> wrote:

> Make IS_ERR() judge the debugfs_create_dir() function return
> in ath9k_init_debug()
> 
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

6edb4ba6fb5b wifi: ath9k: fix parameter check in ath9k_init_debug()
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index fb7a2952d..995c6e705 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