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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}