Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e98318c authored by Wang Ming's avatar Wang Ming Committed by Greg Kroah-Hartman
Browse files

i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()



[ Upstream commit 043b1f185fb0f3939b7427f634787706f45411c4 ]

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: 02e9c290 ("i40e: debugfs interface")
Signed-off-by: default avatarWang Ming <machel@vivo.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6b1ee62e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1755,7 +1755,7 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf)
void i40e_dbg_init(void)
{
	i40e_dbg_root = debugfs_create_dir(i40e_driver_name, NULL);
	if (!i40e_dbg_root)
	if (IS_ERR(i40e_dbg_root))
		pr_info("init of debugfs failed\n");
}