diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-29 11:42:19 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-06-11 21:57:35 +0200 |
commit | 4cbd1149fbcc351bdf08ab749867d157905d0d35 (patch) | |
tree | 7acb025997c961e594116596a135d023361ee603 | |
parent | Btrfs: handle kzalloc() failure in open_ctree() (diff) | |
download | linux-4cbd1149fbcc351bdf08ab749867d157905d0d35.tar.xz linux-4cbd1149fbcc351bdf08ab749867d157905d0d35.zip |
Btrfs: btrfs_iget() returns ERR_PTR
btrfs_iget() returns an ERR_PTR() on failure and not null.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |