Commit 57a5a882031dba5cb7bc7ebc955b897498365fe2
Committed by
Chris Mason
1 parent
5986802c2f
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
fs/btrfs/qgroup.c
... | ... | @@ -1364,8 +1364,10 @@ |
1364 | 1364 | spin_lock(&fs_info->qgroup_lock); |
1365 | 1365 | |
1366 | 1366 | dstgroup = add_qgroup_rb(fs_info, objectid); |
1367 | - if (!dstgroup) | |
1367 | + if (IS_ERR(dstgroup)) { | |
1368 | + ret = PTR_ERR(dstgroup); | |
1368 | 1369 | goto unlock; |
1370 | + } | |
1369 | 1371 | |
1370 | 1372 | if (srcid) { |
1371 | 1373 | srcgroup = find_qgroup_rb(fs_info, srcid); |