aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-01-25 18:34:15 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-28 08:55:54 -0500
commitb473946a0853860e13b51c28add5524741117786 (patch)
treef60ad1068ba160e2628a915aa073ced46872f966
parent3ce1cc52d2e76b6a6b9d0b52b70eb181497efa50 (diff)
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@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/bonding/bond_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 3f0071cfe56b..efa0e41bf3ec 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev)
3639 */ 3639 */
3640 if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { 3640 if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) {
3641 /* something went wrong - fail the open operation */ 3641 /* something went wrong - fail the open operation */
3642 return -1; 3642 return -ENOMEM;
3643 } 3643 }
3644 3644
3645 INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); 3645 INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);