mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
[ Upstream commit043b1f185f] 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:02e9c29081("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
940a2c75f5
commit
c0fa9a5a7a
@@ -1839,7 +1839,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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user