aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/cluster/heartbeat.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-07-17 14:53:48 -0700
committerJoel Becker <joel.becker@oracle.com>2008-07-17 14:53:48 -0700
commitf89ab8619e5320cc9c2576f5f8dcbaf6c0ba3950 (patch)
treee703050b232c76de7cb25afd63a2b4dd885c4bb9 /fs/ocfs2/cluster/heartbeat.c
parent5b664cb235e97afbf34db9c4d77f08ebd725335e (diff)
Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
This reverts commit 11c3b79218390a139f2d474ee1e983a672d5839a. The code will move to PTR_ERR(). Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/cluster/heartbeat.c')
-rw-r--r--fs/ocfs2/cluster/heartbeat.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 443d108211a..f02ccb34604 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1489,28 +1489,25 @@ static struct o2hb_heartbeat_group *to_o2hb_heartbeat_group(struct config_group
: NULL;
}
-static int o2hb_heartbeat_group_make_item(struct config_group *group,
- const char *name,
- struct config_item **new_item)
+static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *group,
+ const char *name)
{
struct o2hb_region *reg = NULL;
- int ret = 0;
+ struct config_item *ret = NULL;
reg = kzalloc(sizeof(struct o2hb_region), GFP_KERNEL);
- if (reg == NULL) {
- ret = -ENOMEM;
- goto out;
- }
+ if (reg == NULL)
+ goto out; /* ENOMEM */
config_item_init_type_name(&reg->hr_item, name, &o2hb_region_type);
- *new_item = &reg->hr_item;
+ ret = &reg->hr_item;
spin_lock(&o2hb_live_lock);
list_add_tail(&reg->hr_all_item, &o2hb_all_regions);
spin_unlock(&o2hb_live_lock);
out:
- if (ret)
+ if (ret == NULL)
kfree(reg);
return ret;