* [patch 1/2] Btrfs: checking for NULL instead of IS_ERR
@ 2012-07-30 8:15 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-07-30 8:15 UTC (permalink / raw)
To: Chris Mason, Arne Jansen; +Cc: linux-btrfs, kernel-janitors
add_qgroup_rb() never returns NULL, only error pointers.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Applies to linux-next.
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index bc424ae..b650155 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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-30 8:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30 8:15 [patch 1/2] Btrfs: checking for NULL instead of IS_ERR Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).