Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4cbd1149 authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Mason
Browse files

Btrfs: btrfs_iget() returns ERR_PTR



btrfs_iget() returns an ERR_PTR() on failure and not null.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 676e4c86
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -392,8 +392,8 @@ static struct dentry *get_default_root(struct super_block *sb,
	location.offset = 0;

	inode = btrfs_iget(sb, &location, new_root, &new);
	if (!inode)
		return ERR_PTR(-ENOMEM);
	if (IS_ERR(inode))
		return ERR_CAST(inode);

	/*
	 * If we're just mounting the root most subvol put the inode and return