Commit b473946a0853860e13b51c28add5524741117786

Authored by stephen hemminger
Committed by David S. Miller
1 parent 3ce1cc52d2

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/bonding/bond_main.c
... ... @@ -3639,7 +3639,7 @@
3639 3639 */
3640 3640 if (bond_alb_initialize(bond, (bond->params.mode == BOND_MODE_ALB))) {
3641 3641 /* something went wrong - fail the open operation */
3642   - return -1;
  3642 + return -ENOMEM;
3643 3643 }
3644 3644  
3645 3645 INIT_DELAYED_WORK(&bond->alb_work, bond_alb_monitor);