Patch "i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-fix-an-null-vs-is_err-bug-for-debugfs_create_di.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d6c0bd8c32a955266e88aa5a4ba54e4d497c2f11
Author: Wang Ming <machel@xxxxxxxx>
Date:   Thu Jul 13 09:42:39 2023 +0800

    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: 02e9c290814c ("i40e: debugfs interface")
    Signed-off-by: Wang Ming <machel@xxxxxxxx>
    Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@xxxxxxxxx> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 989d5c7263d7c..8bcf5902babf7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -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");
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux