Message ID | 20100126013415.0120d6a9@nehalam |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Stephen Hemminger <shemminger@vyatta.com> Date: Tue, 26 Jan 2010 01:34:15 -0800 > 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@vyatta.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- 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);
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@vyatta.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html