iwlwifi: mei: fix return value check in iwl_mei_dbgfs_register()
PATCH 1/1 iwlwifi: mei: fix return value check in iwl_mei_dbgfs_register()
Fix the incorrect return value check for debugfs_create_dir(), which returns ERR_PTR(-ERROR) instead of NULL when it fails.
Fixes 4ea7da5fad43 ("iwlwifi: mei: add debugfs hooks")
Signed-off-by Zhen Lei <[email protected]>
--- drivers/net/wireless/intel/iwlwifi/mei/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/mei/main.c +1 -2
@@ -1921,8 +1921,7 @@ static const struct file_operations iwl_mei_dbgfs_req_ownership_ops = {static void iwl_mei_dbgfs_register (struct iwl_mei *mei) { mei->dbgfs_dir =debugfs_create_dir (KBUILD_MODNAME ,NULL ); - -if (!mei->dbgfs_dir) +if (IS_ERR (mei->dbgfs_dir))return ; debugfs_create_ulong("status", S_IRUSR,
Signature · 1 line
2.34.1