aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:17:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:17:52 -0400
commitf7df406dce01dfd30d7e0c570a928bcfeff03142 (patch)
tree6befad5177581f2f136b22117670f00019c7ea0f /drivers
parent5e248ac9a5c465b356b936030d5a2e80887eb266 (diff)
parenta6795e9ebb420d87af43789174689af0d66d1d35 (diff)
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 387a13395015..e13966bb5f77 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -585,9 +585,8 @@ static struct config_item_type netconsole_target_type = {
585 * Group operations and type for netconsole_subsys. 585 * Group operations and type for netconsole_subsys.
586 */ 586 */
587 587
588static int make_netconsole_target(struct config_group *group, 588static struct config_item *make_netconsole_target(struct config_group *group,
589 const char *name, 589 const char *name)
590 struct config_item **new_item)
591{ 590{
592 unsigned long flags; 591 unsigned long flags;
593 struct netconsole_target *nt; 592 struct netconsole_target *nt;
@@ -599,7 +598,7 @@ static int make_netconsole_target(struct config_group *group,
599 nt = kzalloc(sizeof(*nt), GFP_KERNEL); 598 nt = kzalloc(sizeof(*nt), GFP_KERNEL);
600 if (!nt) { 599 if (!nt) {
601 printk(KERN_ERR "netconsole: failed to allocate memory\n"); 600 printk(KERN_ERR "netconsole: failed to allocate memory\n");
602 return -ENOMEM; 601 return ERR_PTR(-ENOMEM);
603 } 602 }
604 603
605 nt->np.name = "netconsole"; 604 nt->np.name = "netconsole";
@@ -616,8 +615,7 @@ static int make_netconsole_target(struct config_group *group,
616 list_add(&nt->list, &target_list); 615 list_add(&nt->list, &target_list);
617 spin_unlock_irqrestore(&target_list_lock, flags); 616 spin_unlock_irqrestore(&target_list_lock, flags);
618 617
619 *new_item = &nt->item; 618 return &nt->item;
620 return 0;
621} 619}
622 620
623static void drop_netconsole_target(struct config_group *group, 621static void drop_netconsole_target(struct config_group *group,