Преглед на файлове

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>
stephen hemminger преди 15 години
родител
ревизия
b473946a08
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      drivers/net/bonding/bond_main.c

+ 1 - 1
drivers/net/bonding/bond_main.c

@@ -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);