[2/11] btrfs: btrfs_iget() returns ERR_PTR
diff mbox

Message ID 20100529094219.GC5483@bicker
State New, archived
Headers show

Commit Message

Dan Carpenter May 29, 2010, 9:42 a.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 28b53f1..f2393b3 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -392,8 +392,8 @@  setup_root:
 	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