|
@@ -1176,8 +1176,12 @@ int ath10k_debug_register(struct ath10k *ar)
|
|
|
{
|
|
|
ar->debug.debugfs_phy = debugfs_create_dir("ath10k",
|
|
|
ar->hw->wiphy->debugfsdir);
|
|
|
- if (!ar->debug.debugfs_phy)
|
|
|
- return -ENOMEM;
|
|
|
+ if (IS_ERR_OR_NULL(ar->debug.debugfs_phy)) {
|
|
|
+ if (IS_ERR(ar->debug.debugfs_phy))
|
|
|
+ return PTR_ERR(ar->debug.debugfs_phy);
|
|
|
+ else
|
|
|
+ return -ENOMEM;
|
|
|
+ }
|
|
|
|
|
|
INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork,
|
|
|
ath10k_debug_htt_stats_dwork);
|