Skip to content

Commit 1d14721

Browse files
Jinjie Ruanjonmason
authored andcommitted
ntb: intel: Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
The debugfs_create_dir() function returns error pointers. It never returns NULL. So use IS_ERR() to check it. Fixes: e26a584 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent 0bb80ec commit 1d14721

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/hw/intel/ntb_hw_gen1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ static void ndev_init_debugfs(struct intel_ntb_dev *ndev)
778778
ndev->debugfs_dir =
779779
debugfs_create_dir(pci_name(ndev->ntb.pdev),
780780
debugfs_dir);
781-
if (!ndev->debugfs_dir)
781+
if (IS_ERR(ndev->debugfs_dir))
782782
ndev->debugfs_info = NULL;
783783
else
784784
ndev->debugfs_info =

0 commit comments

Comments
 (0)