]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ntb: intel: Fix the NULL vs IS_ERR() bug for debugfs_create_dir()
authorJinjie Ruan <ruanjinjie@huawei.com>
Thu, 31 Aug 2023 12:39:27 +0000 (20:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:03 +0000 (15:11 +0200)
commita429158f2e0a7a03eb67fd5e204e1f6735c725aa
treeb35c8bf8734fcfc523312df2f61d2a600446b3ef
parent35c8e66e7952a6e5b267ed3948a63fa659637fd1
ntb: intel: Fix the NULL vs IS_ERR() bug for debugfs_create_dir()

[ Upstream commit e229897d373a87ee09ec5cc4ecd4bb2f895fc16b ]

The debugfs_create_dir() function returns error pointers.
It never returns NULL. So use IS_ERR() to check it.

Fixes: e26a5843f7f5 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ntb/hw/intel/ntb_hw_gen1.c