mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 18:05:21 +02:00
wifi: ath9k: use IS_ERR() with debugfs_create_dir()
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: e5facc75fa
("ath9k_htc: Cleanup HTC debugfs")
Signed-off-by: Wang Ming <machel@vivo.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230713030358.12379-1-machel@vivo.com
This commit is contained in:
parent
afb522b36e
commit
1e4134610d
|
@ -486,7 +486,7 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
|
||||||
|
|
||||||
priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
|
priv->debug.debugfs_phy = debugfs_create_dir(KBUILD_MODNAME,
|
||||||
priv->hw->wiphy->debugfsdir);
|
priv->hw->wiphy->debugfsdir);
|
||||||
if (!priv->debug.debugfs_phy)
|
if (IS_ERR(priv->debug.debugfs_phy))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
|
ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user