summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 17:17:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 17:17:52 -0700
commitf7df406dce01dfd30d7e0c570a928bcfeff03142 (patch)
tree6befad5177581f2f136b22117670f00019c7ea0f /drivers
parent5e248ac9a5c465b356b936030d5a2e80887eb266 (diff)
parenta6795e9ebb420d87af43789174689af0d66d1d35 (diff)
downloadop-kernel-dev-f7df406dce01dfd30d7e0c570a928bcfeff03142.zip
op-kernel-dev-f7df406dce01dfd30d7e0c570a928bcfeff03142.tar.gz
Merge branch 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6
* 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6: configfs: Allow ->make_item() and ->make_group() to return detailed errors. Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/netconsole.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 387a133..e13966b 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -585,9 +585,8 @@ static struct config_item_type netconsole_target_type = {
* Group operations and type for netconsole_subsys.
*/
-static int make_netconsole_target(struct config_group *group,
- const char *name,
- struct config_item **new_item)
+static struct config_item *make_netconsole_target(struct config_group *group,
+ const char *name)
{
unsigned long flags;
struct netconsole_target *nt;
@@ -599,7 +598,7 @@ static int 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 -ENOMEM;
+ return ERR_PTR(-ENOMEM);
}
nt->np.name = "netconsole";
@@ -616,8 +615,7 @@ static int make_netconsole_target(struct config_group *group,
list_add(&nt->list, &target_list);
spin_unlock_irqrestore(&target_list_lock, flags);
- *new_item = &nt->item;
- return 0;
+ return &nt->item;
}
static void drop_netconsole_target(struct config_group *group,
OpenPOWER on IntegriCloud