Commit b473946a authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ce1cc52
...@@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev) ...@@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev)
*/ */
if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) { if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) {
/* something went wrong - fail the open operation */ /* something went wrong - fail the open operation */
return -1; return -ENOMEM;
} }
INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor); INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment