aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/qgroup.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-07-30 02:15:43 -0600
committerChris Mason <chris.mason@oracle.com>2012-08-28 16:53:25 -0400
commit57a5a882031dba5cb7bc7ebc955b897498365fe2 (patch)
treecae85b46388641513146af860f0140d26811ae57 /fs/btrfs/qgroup.c
parent5986802c2fcc754040bb7ed95f30bb16c4a843b7 (diff)
downloadvexpress-lsk-57a5a882031dba5cb7bc7ebc955b897498365fe2.tar.gz
Btrfs: checking for NULL instead of IS_ERR
add_qgroup_rb() never returns NULL, only error pointers. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r--fs/btrfs/qgroup.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 229ef8927e6..38b42e7bc91 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1364,8 +1364,10 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
spin_lock(&fs_info->qgroup_lock);
dstgroup = add_qgroup_rb(fs_info, objectid);
- if (!dstgroup)
+ if (IS_ERR(dstgroup)) {
+ ret = PTR_ERR(dstgroup);
goto unlock;
+ }
if (srcid) {
srcgroup = find_qgroup_rb(fs_info, srcid);