]> 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:29:35 +0000 (16:29 +0200)
commit16e5bed6c1883b19f9fcbdff996aa3381954d5f3
treec5557859f5402c9ab7d4a0f1344bf5a9f6d8e926
parentb15dd2aa7987e89a2a889a4c241ad9c4a354e689
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