Skip to content

Commit

Permalink
bonding: bond_open error return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stephen hemminger authored and David S. Miller committed Jan 28, 2010
1 parent 3ce1cc5 commit b473946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3639,7 +3639,7 @@ static int bond_open(struct net_device *bond_dev)
*/
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);
Expand Down

0 comments on commit b473946

Please sign in to comment.