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>
This commit is contained in:
parent
f7d067041e
commit
45191087c3
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user