Commit e229897d authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Jon Mason
Browse files

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: e26a5843 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 98f7e32f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -778,7 +778,7 @@ static void ndev_init_debugfs(struct intel_ntb_dev *ndev)
		ndev->debugfs_dir =
			debugfs_create_dir(pci_name(ndev->ntb.pdev),
					   debugfs_dir);
		if (!ndev->debugfs_dir)
		if (IS_ERR(ndev->debugfs_dir))
			ndev->debugfs_info = NULL;
		else
			ndev->debugfs_info =