]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix NULL vs IS_ERR() bug for debugfs_create_dir()
authorJinjie Ruan <ruanjinjie@huawei.com>
Thu, 31 Aug 2023 14:09:29 +0000 (22:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:09 +0000 (11:11 +0200)
commitbc912eed8a1a673adf2678281f87f96a2f288e86
tree9e756080ee57678c6ce02560e004674cb49e4aed
parentcbf226355ee3abb98ff266c3ed8ddacae7bfcfa6
scsi: qla2xxx: Fix NULL vs IS_ERR() bug for debugfs_create_dir()

[ Upstream commit d0b0822e32dbae80bbcb3cc86f34d28539d913df ]

Since both debugfs_create_dir() and debugfs_create_file() return ERR_PTR
and never NULL, use IS_ERR() instead of checking for NULL.

Fixes: 1e98fb0f9208 ("scsi: qla2xxx: Setup debugfs entries for remote ports")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230831140930.3166359-1-ruanjinjie@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla2xxx/qla_dfs.c