Commit 92ac2137 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by sanglipeng
Browse files

scsi: qla2xxx: Fix NULL vs IS_ERR() bug for debugfs_create_dir()

stable inclusion
from stable-v5.10.197
commit ae889fffae52a4131dccfbd57487af7a1caf721b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I96Q8P

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ae889fffae52a4131dccfbd57487af7a1caf721b



--------------------------------

[ Upstream commit d0b0822e ]

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

Fixes: 1e98fb0f ("scsi: qla2xxx: Setup debugfs entries for remote ports")
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230831140930.3166359-1-ruanjinjie@huawei.com


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 1ee36d6d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment