summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-06-17 16:23:47 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-06-17 16:23:47 +1000
commitdbded3c5e60b9b89ca505cd6708344600eece536 (patch)
tree5aa63c6571723ebb1443dfa25976c29d91d67d55 /drivers
parent21d5a5fd34f7ffd0beaeef80f927b6bd514523cb (diff)
parent5d861bc19381ad7168c25940c32a55efe64b3685 (diff)
Merge commit 'ocfs2/linux-next'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netconsole.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 665341e43055..387a13395015 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -585,8 +585,9 @@ static struct config_item_type netconsole_target_type = {
* Group operations and type for netconsole_subsys.
*/
-static struct config_item *make_netconsole_target(struct config_group *group,
- const char *name)
+static int make_netconsole_target(struct config_group *group,
+ const char *name,
+ struct config_item **new_item)
{
unsigned long flags;
struct netconsole_target *nt;
@@ -598,7 +599,7 @@ static struct config_item *make_netconsole_target(struct config_group *group,
nt = kzalloc(sizeof(*nt), GFP_KERNEL);
if (!nt) {
printk(KERN_ERR "netconsole: failed to allocate memory\n");
- return NULL;
+ return -ENOMEM;
}
nt->np.name = "netconsole";
@@ -615,7 +616,8 @@ static struct config_item *make_netconsole_target(struct config_group *group,
list_add(&nt->list, &target_list);
spin_unlock_irqrestore(&target_list_lock, flags);
- return &nt->item;
+ *new_item = &nt->item;
+ return 0;
}
static void drop_netconsole_target(struct config_group *group,