]> 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>
Fri, 4 Oct 2024 14:33:13 +0000 (16:33 +0200)
commitb66bf833e72a1e23d7ccafc0f8f74e80f8c357b5
tree8d58ddb9549c70bcd07d1a4ade0f3e03ef9a6d3b
parent08e9de3a5619e003058dddbcb13fc33b7bfb902a
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