[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100126013415.0120d6a9@nehalam>
Date:	Tue, 26 Jan 2010 01:34:15 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Jay Vosburgh <fubar@...ibm.com>
Cc:	bonding-devel@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: [PATCH] bonding: bond_open error return value
The convention for API functions in kernel is to return errno value;
bond_open would return -1 if alb setup failed. The only reason that
could happen is if kmalloc() failed.
Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
--- a/drivers/net/bonding/bond_main.c	2010-01-26 01:28:18.281568331 -0800
+++ b/drivers/net/bonding/bond_main.c	2010-01-26 01:29:58.101099312 -0800
@@ -3650,7 +3650,7 @@ static int bond_open(struct net_device *
 		 */
 		if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) {
 			/* something went wrong - fail the open operation */
-			return -1;
+			return -ENOMEM;
 		}
 
 		INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists