Skip to content

Commit

Permalink
wifi: ath9k: use IS_ERR() with debugfs_create_dir()
Browse files Browse the repository at this point in the history
[ Upstream commit 1e41346 ]

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.

Fixes: e5facc7 ("ath9k_htc: Cleanup HTC debugfs")
Signed-off-by: Wang Ming <[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]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Ulrich Hecht <[email protected]>
  • Loading branch information
Wang Ming authored and Ulrich Hecht committed Oct 9, 2023
1 parent 182a75b commit d5657d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/htc_drv_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d5657d0

Please sign in to comment.