From: Dan Carpenter Date: Mon, 30 Jul 2012 08:15:43 +0000 (-0600) Subject: Btrfs: checking for NULL instead of IS_ERR X-Git-Tag: v3.6-rc4~6^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57a5a882031dba5cb7bc7ebc955b897498365fe2;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Btrfs: checking for NULL instead of IS_ERR add_qgroup_rb() never returns NULL, only error pointers. Signed-off-by: Dan Carpenter --- diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 229ef89..38b42e7 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);