Commit 45191087 authored by Minjie Du's avatar Minjie Du Committed by Jon Mason

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: default avatarMinjie Du <duminjie@vivo.com>
Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent f7d06704
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment