From: Dan Carpenter Date: Sat, 29 May 2010 09:42:19 +0000 (+0000) Subject: Btrfs: btrfs_iget() returns ERR_PTR X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4cbd1149fbcc351bdf08ab749867d157905d0d35;p=linux-beck.git Btrfs: btrfs_iget() returns ERR_PTR btrfs_iget() returns an ERR_PTR() on failure and not null. Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9ea711430466..859ddaab5e02 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