The parameter 'phydir' error check is mistake. debugfs_create_file() will return early if 'phydir' is an error pointer, so the error check is removed. Signed-off-by: Minjie Du <duminjie@xxxxxxxx> --- v1: use IS_ERR() to error check. v2: use IS_ERR_OR_NULL() to error check. v3: remove the error check. v4: fix the patch format. --- drivers/net/wireless/ath/ath5k/debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 4b41160e5..ec130510a 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c @@ -982,8 +982,6 @@ ath5k_debug_init_device(struct ath5k_hw *ah) ah->debug.level = ath5k_debug; phydir = debugfs_create_dir("ath5k", ah->hw->wiphy->debugfsdir); - if (!phydir) - return; debugfs_create_file("debug", 0600, phydir, ah, &fops_debug); debugfs_create_file("registers", 0400, phydir, ah, ®isters_fops); -- 2.39.0