Skip to content

Commit 043b1f1

Browse files
Wang Minganguy11
authored andcommitted
i40e: Fix an NULL vs IS_ERR() bug for 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 i40e_dbg_init() was forgotten. Fix the remaining error check. Fixes: 02e9c29 ("i40e: debugfs interface") Signed-off-by: Wang Ming <machel@vivo.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 57f1f9d commit 043b1f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf)
18391839
void i40e_dbg_init(void)
18401840
{
18411841
i40e_dbg_root = debugfs_create_dir(i40e_driver_name, NULL);
1842-
if (!i40e_dbg_root)
1842+
if (IS_ERR(i40e_dbg_root))
18431843
pr_info("init of debugfs failed\n");
18441844
}
18451845

0 commit comments

Comments
 (0)