Unverified Commit d9ee2998 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!1427 nbd: Fix debugfs_create_dir error checking

parents 961759c0 c8ff919f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1719,7 +1719,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd)
		return -EIO;

	dir = debugfs_create_dir(nbd_name(nbd), nbd_dbg_dir);
	if (!dir) {
	if (IS_ERR(dir)) {
		dev_err(nbd_to_dev(nbd), "Failed to create debugfs dir for '%s'\n",
			nbd_name(nbd));
		return -EIO;
@@ -1745,7 +1745,7 @@ static int nbd_dbg_init(void)
	struct dentry *dbg_dir;

	dbg_dir = debugfs_create_dir("nbd", NULL);
	if (!dbg_dir)
	if (IS_ERR(dbg_dir))
		return -EIO;

	nbd_dbg_dir = dbg_dir;