summaryrefslogtreecommitdiff
path: root/drivers/ntb
diff options
context:
space:
mode:
authorMinjie Du <duminjie@vivo.com>2023-07-13 11:47:27 +0800
committerJon Mason <jdmason@kudzu.us>2023-08-18 09:50:06 -0400
commit45191087c3e2866e4fbcd775e443ee0380211ed1 (patch)
tree671f8b99ab1ac569a7d469db3e5f5b8845329723 /drivers/ntb
parentf7d067041e35a8c25a8429ddac97dcca7cf28da2 (diff)
dtivers: ntb: fix parameter check in perf_setup_dbgfs()
Make IS_ERR() judge the debugfs_create_dir() function return in perf_setup_dbgfs(). Signed-off-by: Minjie Du <duminjie@vivo.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/test/ntb_perf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 65e1e5cf1b29..553f1f46bc66 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -1355,7 +1355,7 @@ static void perf_setup_dbgfs(struct perf_ctx *perf)
struct pci_dev *pdev = perf->ntb->pdev;
perf->dbgfs_dir = debugfs_create_dir(pci_name(pdev), perf_dbgfs_topdir);
- if (!perf->dbgfs_dir) {
+ if (IS_ERR(perf->dbgfs_dir)) {
dev_warn(&perf->ntb->dev, "DebugFS unsupported\n");
return;
}