projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b718ae8
)
nvme: fix parameter check in nvme_fault_inject_init()
author
Minjie Du
<duminjie@vivo.com>
Wed, 12 Jul 2023 11:18:37 +0000
(19:18 +0800)
committer
Keith Busch
<kbusch@kernel.org>
Wed, 12 Jul 2023 15:48:33 +0000
(08:48 -0700)
Make IS_ERR() judge the debugfs_create_dir() function return.
Signed-off-by: Minjie Du <duminjie@vivo.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fault_inject.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/fault_inject.c
b/drivers/nvme/host/fault_inject.c
index
83d2e68
..
1ba10a5
100644
(file)
--- a/
drivers/nvme/host/fault_inject.c
+++ b/
drivers/nvme/host/fault_inject.c
@@
-27,7
+27,7
@@
void nvme_fault_inject_init(struct nvme_fault_inject *fault_inj,
/* create debugfs directory and attribute */
parent = debugfs_create_dir(dev_name, NULL);
- if (
!parent
) {
+ if (
IS_ERR(parent)
) {
pr_warn("%s: failed to create debugfs directory\n", dev_name);
return;
}