Skip to content

Commit 4519108

Browse files
Minjie Dujonmason
authored andcommitted
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>
1 parent f7d0670 commit 4519108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/test/ntb_perf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ static void perf_setup_dbgfs(struct perf_ctx *perf)
13551355
struct pci_dev *pdev = perf->ntb->pdev;
13561356

13571357
perf->dbgfs_dir = debugfs_create_dir(pci_name(pdev), perf_dbgfs_topdir);
1358-
if (!perf->dbgfs_dir) {
1358+
if (IS_ERR(perf->dbgfs_dir)) {
13591359
dev_warn(&perf->ntb->dev, "DebugFS unsupported\n");
13601360
return;
13611361
}

0 commit comments

Comments
 (0)